In special case, the time complexity of inserting/deleting elements at the end of dynamic array is __________

In special case, the time complexity of inserting/deleting elements at the end of dynamic array is __________ Correct Answer O (n)

In general, the time complexity of inserting or deleting elements at the end of dynamic array is O (1). Elements are added at reserved space of dynamic array. If this reserved space is exceeded, then the physical size of the dynamic array is reallocated and every element is copied from original array. This will take O(n) time to add new element at the end of the array.
Bissoy MCQ

Related Questions

Statement 1: In insertion sort, after m passes through the array, the first m elements are in sorted order. Statement 2: And these elements are the m smallest elements in the array.