Big-O plain English

  • O(1) — constant; same speed regardless of input size (hash map lookup, array access)
  • O(log N) — logarithmic; doubles input → adds one step (binary search)
  • O(N) — linear; doubles input → doubles time (single loop)
  • O(N log N) — linearithmic; efficient sorting; slightly worse than linear
  • O(N²) — quadratic; nested loops; doubles input → 4× time; avoid for large N

Question 0 of 5

A colleague says: "This function runs in O(1) time." What does that mean in plain English?