Question DSA-CX-0075
HardA stack supports push, pop and multipop(k). What is the amortised cost per operation over any sequence of n operations?
- A.
O(1)
- B.
O(log n)
- C.
O(n)
- D.
O(k)
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
Complexity Analysis question
A stack supports push, pop and multipop(k). What is the amortised cost per operation over any sequence of n operations?
O(1)
O(log n)
O(n)
O(k)
Sign up free to see the answer and a step-by-step explanation.