Question DSA-CX-0053
MediumIf a dynamic array grows by a fixed 10 slots instead of doubling, what is the total cost of n appends?
- A.
O(n)
- B.
O(n log 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
If a dynamic array grows by a fixed 10 slots instead of doubling, what is the total cost of n appends?
O(n)
O(n log n)
Sign up free to see the answer and a step-by-step explanation.
O(n²)
O(1)