Solved

What Is the Function of the Peek Method in a Stack

Question 38

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents