Stack A has entries a,b,c,d(with a on top).Stack B is empty.
An entry popped out of stack A is pushed into stack B.
An entry popped out of stack B can only be printed.
The no. of possible permutation for printing the elements are __ ?
- 24
- 12
- 21
- 14
can anybody give a generalized formula with explanation for this ?