How to compute all the permutations of a stack of numbers from 1 to n without using stack STL. I tried using matching paranthesis but got the wrong answer.
How to compute all the permutations of a stack of numbers from 1 to n without using stack STL. I tried using matching paranthesis but got the wrong answer.