I have a question I need some explaination please:
Suppose we perform an intermixed sequence of insert and remove operations to an ADT such that the integers 1 to 0 are inserted as follows:
1 is inserted before 2, 2 is inserted before 3, 3 is inserted before 4, and so on.
For each sequence shown below, write down the first impossible integer removed from the sequence, or 0 if no such impossible remove operation exists, assuming the ADT is
i) A stack
ii) A queue
It looks like you're new here. If you want to get involved, click one of these buttons!