Quadratic algorithms are slow (and hashmaps are fast)

19 · Julia Evans · Sept. 10, 2021, 10:41 p.m.
Hello! I was talking to a friend yesterday who was studying for a programming interview and trying to learn some algorithms basics. The topic of quadratic-time vs linear-time algorithms came up, I thought this would be fun to write about here because avoiding quadratic-time algorithms isn’t just important in interviews – it’s sometimes good to know about in real life too! I’ll explain what a “quadratic-time algorithm is” in a minute :) here are the 3 things we’ll talk about: quadratic time func...