6.Given N different elements, how many different sequences can be generated by pushing and popping all elements from sta
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
6.Given N different elements, how many different sequences can be generated by pushing and popping all elements from sta
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%) >