Question: Using c++ implement stacks and queues ADT. a stack or a que can be used to recognize a certain type of patterns. 1. consider the
Using c++ implement stacks and queues ADT. a stack or a que can be used to recognize a certain type of patterns.
1. consider the pattern STRING1#STRING2 where neither STRING1 and STRING2 contain "#"
2. Use stack ADT to determine whether or not the two strings are the same. STRING1 and STRING2 are the same if they have the same number of elements and the elements at the corresponding positions are the same
3. Use Queue ADT to determin whether or not STRING2 is reversed of STRING1.
4.the program should display a menue on the screen allowing the user to enter the elements of stack or queue (1 or 2). the program should terminate when the user enters 9 any other input should show an invalid choice.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
