How do you retrieve the top element from a Stack without removing it?

Last Updated :
Discuss
Comments

How do you retrieve the top element from a Stack without removing it?

pop()

peek()

top()

get()

Share your thoughts in the comments