DEV Community

Discussion on: Comprehensive Big O Notation Guide in Plain English, using Javascript

 
humblecoder00 profile image
Şahin Arslan

Yes, main reason is mutation place: beginning of an array. Adding or removing an element from start changes index order of all other elements coming after it.

Thread Thread
 
danoseun profile image
'Seun Somefun

Thanks Sahin

Thread Thread
 
celestelayne profile image
Celeste

this is a super important point :-) thanks!

Some comments have been hidden by the post's author - find out more