Multiple Choice
What is the function of the peek method in a stack implementation?
A) to return the bottom item without removing it
B) to return the top item without removing it
C) to return the top item and remove it from the stack
D) to return the bottom item and remove it from the stack
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q26: In the algorithm that checks for a
Q27: Using a stack is a good approach
Q28: Addition and subtraction have higher precedence when
Q29: The time complexity of the postfix expression
Q30: Which of the following is NOT an
Q32: To avoid stack overflow, the stack algorithm
Q33: When evaluating an arithmetic expression, first you
Q34: When converting from infix form to postfix
Q35: What is the operation that adds items
Q36: The Node class for use in the