Page 1 of 1

6.Given N different elements, how many different sequences can be generated by pushing and popping all elements from sta

Posted: Wed Mar 30, 2022 9:31 am
by answerhappygod
6 Given N Different Elements How Many Different Sequences Can Be Generated By Pushing And Popping All Elements From Sta 1
6 Given N Different Elements How Many Different Sequences Can Be Generated By Pushing And Popping All Elements From Sta 1 (60.44 KiB) Viewed 32 times
Stack theorem.
Answer is not n!
6.Given N different elements, how many different sequences can be generated by pushing and popping all elements from stack. (15%) e.g., Push 3 different elements A, B, C, and pop from stack if there are any elements in the stack optionally. We can get 5 different results. ABC · ACB BAC · BCA СВА. (a). Count the result if using 5 different elements. (5%) (b). Count the result if using N different elements. (10%) >