Question DSA-STK-0003
EasyWhich operation adds an element to the top of a stack?
- A.
push
- B.
enqueue
- C.
pop
- D.
peek
Show answer and explanation
Answer: A
pop removes the top element; peek reads it without removing it.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Stacks question
Which operation adds an element to the top of a stack?
push
enqueue
pop
peek
Answer: A
pop removes the top element; peek reads it without removing it.