Write an entire c++/java/c# program to prompt the user to enter positive integers, and 0 to stop. Store the integers in a vector. Then print out all the permutations of the sequence that come BEFORE the input sequence
Example Input // original sequence is 3 1 2
> 3
> 1
> 2
> 0
Corresponding output
1 2 3
1 3 2
2 1 3
2 3 1