Improvise adapt overrule
submitted by
edited
https://leminal.space/pictrs/image/8fe9a64f-1ffb-4aa4-bcb6-49d2444ebce0.png
https://leminal.space/pictrs/image/8fe9a64f-1ffb-4aa4-bcb6-49d2444ebce0.png
Well I just had to work it out again myself and you’re right. I dunno what scenario I was thinking of that had worse complexity and whether it was really due to dynamic arrays; I just remember getting asked about it in some interview and somehow the answer ended up being “use a linked list and the time complexity goes down to linear” /shrug
Thanks for the correction!