Given the following sequence of letters and asterisks :
a) Suppose that for above sequence, each letter (such as E) corresponds to push of that letter onto the stack and each asterisk (*) corresponds to a pop operation on the stack. Show the sequence of values returned by the pop operation.
b.) Consider the queue data structure, supporting two operations insert and remove,. Suppose that for the above sequence each letter (such as E) corresponds to an insert of that letter into the queue and each asterisks (*) corresponds a remove operations on the queue. Show the sequence of values returned by the remove operations.