Question DSA-CX-0076
HardIncrementing a binary counter n times from 0: what is the amortised cost per increment?
- A.
O(log n)
- B.
O(n)
- 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
Complexity Analysis question
Incrementing a binary counter n times from 0: what is the amortised cost per increment?
O(log n)
O(n)
Sign up free to see the answer and a step-by-step explanation.
O(1)
O(n log n)