In a dynamic array, when an element is inserted at the beginning, all the existing elements have to be shifted one position to the right. Hence, the time complexity for this operation is O(n).
Was this answer helpful?
0
0
Top AP PGECET Computer Science & Information Technology Questions