Checkpoint 2 Review Ticket Avinh Gabe
Challenge #1, Add and Delete elements from Queue. Working with the code that is given, you will need to adjust Add and write Delete, to output from the Queue as follows.
Challenge #2, perform a merge or combination of 2 Queue's that are ordered. This is a foundation step for the algorithm used in Merge sorting. IMO, this algorithm is easier if you "peek" at data at the head of the queue, prior to performing dequeue action.
Challenge #3, Shuffle the Queue. Iterate through the Queue and change data with another random position in the queue.
Challenge #4, Build a Stack and use it to reverse the order of a Queue. The Queue is a LIFO Data Structure, the Stack is a FIFO data structure, so code is similar but most everything is reversed.
unkown • 6/16/2025, 1:06:39 PM