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.
More from Fun
- OpenAI custom ModRetro Chromatic handheld spotted, branded "Research and Deployment Co." — shaunralston · 2026-11-26
- Lean community byte-exact mirrors claimed Riemann Hypothesis proof, compiles in 35 min on 192 cores — burny_tech · 2026-11-26
- Asked to "define intelligence", this reply dumps the entire definitions collection — burny_tech · 2026-11-26
- AI virtual influencer Lexi Love accuses Paramount of using her digital identity and trademark without consent — LexiLove · 2026-11-26
- Claude solves a wooden snake cube from a single photo and animates all 17 twists in 3D — himanshustwts · 2026-11-26
- Crackpots used to claim false proofs; now they claim correct proofs are flawed — lpachter · 2026-11-26