USE C++!!
Given a string you need to print all possible strings that can be made by placing spaces (zero or one) in between them. The output should be printed insortedincreasing order of strings.
You don't need to read input or print anything. Your task is to complete the functionvectorpermutation(string S) which takes the string S as input parameters and returns thesorted arrayof the string denoting the different permutation(DON'T ADD '(' and ')' it will be handled by the driver code only).Expected Time Complexity: O(2^n)Expected Auxiliary Space: O(1)
CONSTRAINTS:1 < |s|=""><>S only containslowercase and Uppercase English letters.
ATTACHED BELOW ARE THE REQUIRED DRIVER CODES
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here