The interview question I got wrong: why array access is O(1) but linked list is O(n)

cneuralnetwork · x · 2026-11-26

A poster shares an interview question he flubbed: why is array access O(1) but linked list access O(n)? His answer "arrays are faster" missed the point — arrays occupy contiguous memory so the address is computed directly from the index, while linked lists require traversing nodes node by node.

Original post →

More from Fun

Fun channel →