Question DSA-STK-0055
MediumWhat is the time complexity of each operation of a stack implemented with a linked list?
- A.
O(log n) for pop
- B.
O(1) for push, pop and peek
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Stacks question
What is the time complexity of each operation of a stack implemented with a linked list?
O(log n) for pop
O(1) for push, pop and peek
Sign up free to see the answer and a step-by-step explanation.
O(n) for peek
O(n) for push