Calculate the time complexity of deleting an element from the beginning of a dynamic array.
- AO(log)
- BO(1)
- CO(log n)
- DO(n)
Correct answer: D
Explanation
Deleting from the beginning of a dynamic array shifts all the remaining elements by one position, which takes O(n) time. Discussion 0
Nobody has replied yet. Start the discussion!