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%) >
6.Given N different elements, how many different sequences can be generated by pushing and popping all elements from sta
-
answerhappygod
- Site Admin
- Posts: 899604
- 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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!