Question: Question 6 (10 marks) Programming With Data Structures: The API for the Queue class is given below. Constructor Summary Queue () Construct an empty Queue.

Question 6 (10 marks) Programming With Data Structures: The API for the Queue class is given below. Constructor Summary Queue () Construct an empty Queue. Method Summary dequeue () Remove and return the rst element in the Queue. Return null if the Queue is empty. void enqueue (Object item) Add the given item to the end of the Queue. The API for the Node class is given below. Constructor Summary Node () Construct a node that can be used to make a binary tree. The child links will be null and the value will be -1. Node (int value) Construct a Node with the value set to item. Method Summary getLeft () Returns the left child of this Node. getRight () Returns the right child of this Node. getValue () Returns the value of this Node
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
