• Array index (read or write)Arrays
  • Dynamic array appendArrays
  • Dynamic array insert or delete in the middleArrays
  • Linear searchSearching
  • Binary searchSearching
  • Hash table lookup, insert, deleteHash tables
  • Linked list insert or delete at a known nodeLinked lists
  • Linked list searchLinked lists

Array index (read or write)

Best caseO(1)
Average caseO(1)
Worst caseO(1)
Auxiliary spaceO(1)

Assumptions: Random access into contiguous memory.

Watch out for: Linked lists have no O(1) index. Reaching position k takes O(k).

Keyboard shortcuts

/
Search topics
?
Show this list of shortcuts
r
Open the revision sheet
b
Save or unsave the focused card, or the topic you are reading
l
Mark the focused card, or the topic you are reading, as learned
Space Left arrow Right arrow
In the visualizer: play or pause, step back, step forward
1 to 4 Enter
In the quiz: pick an answer, then go to the next question
Escape
Close this list