Singly linked list

easy

Insert at the front without shifting a single element - then search for a value and count the hops. That trade is the entire reason linked lists exist, and the entire reason arrays usually win anyway.

Best O(1) head insertAverage O(n) searchWorst O(n)Space O(n)
Loading the singly linked list engine…

Where to go next