Add Element: Add element at the end if array size is not enough then then extend size of array and add element at the end of original array as well as given index. Doing all that copying takes O(n) time, where n is the number of elements in our array. That’s an expensive cost for an append. In a fixed-length array, appends only take O(1) time. - Study24x7
Social learning Network
24 Mar 2019 12:58 PM study24x7 study24x7

Add Element: Add element at the end if array size is not enough then then extend size of array and add element at the end of original array as well as given index. Doing all that copying takes O(n) time, where n is the number of elements in our array. That’s an expensive c...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles