Question DSA-CX-0015
MediumWhat is the amortised time complexity of appending to a dynamic array (like a Python list) that doubles its capacity when full?
- 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
What is the amortised time complexity of appending to a dynamic array (like a Python list) that doubles its capacity when full?
O(log n)
O(n²)
Sign up free to see the answer and a step-by-step explanation.
O(n)
O(1)