Starting from:

$35

CS3358 - Assignment 4 Solved

 Data Structures                                                                                                                                           Programming



Programming Assignment 4 
Stacks – Queues

th

Due Date : Section 0 - Wednesday March 28, 2018 - No Later than 2:15 pm 
Section 1 - Wednesday March 28 th , 2018 - No Later than 3:45 pm. 
Section 2 - Wednesday March 28 th , 2018 - No Later than 5:15 pm.

 For this assignment you will implement stacks and queues ADT. A stack or a queue can be used to recognize a certain types of patterns.

Consider the pattern STRING1#STRING2 where neither STRING1 and STRING2 contains “#”.

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.

Use queue ADT to determine whether or not STRING2 is reversed of STRING1.

The program displays a menu on the screen allowing the user to enter the elements of stack or queue. The program terminates when the user enters 9.

Note:

·                      Size of stack and queue is determined by the number of the elements entered.

·                     You are not allowed to use        stack / queue libraries. You must 
implement all stack / queue functions and operations . Use only one .cpp to define and implement templates and the driving program.

·                      You are not allowed to use string manipulation operations.

More products