DEV Community

Discussion on: Fun With Linear Time: My Favorite Algorithm

Collapse
 
healeycodes profile image
Andrew Healey

Looks great! Watch out for unshift() which could have an O(n) runtime.

Collapse
 
ahmedmusallam profile image
Ahmed Musallam

ah, good point, updated!