Complete the following code:
/** Returns the item at the front of the queue without removing it.
@return The item at the front if successful; null if not
*/
Public E ____() {
If (size() == 0)
Return null;
Else
Return theQueue.getFirst() ;
}
A) poll
B) element
C) remove
D) peek
Correct Answer:
Verified
Q14: Through _, the designers of a new
Q15: _ is a technique used to study
Q16: When a queue is implemented using a
Q17: When a queue is implemented using a
Q18: Complete the following code:
/** Returns the next
Q20: Complete the following code.
/** Insert an item
Q21: If a non-circular array is used to
Q22: Complete the following code:
/** Remove the item
Q23: _ traversal implies that you will follow
Q24: _ traversal implies that the nodes visited
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents