logoalt Hacker News

amomchilov • today at 4:47 AM • 1 reply • view on HN

“Big o notation” are the search terms you’re looking for.

It’s a notation for quantifying the complexity of algorithms, by how the number of operations needed scales with the size of the input (often “n”). For example, greeting every person when you enter a room is O(n), because the number of greetings increases linearly with the number of people in the room. But having every person in a room greet every other person in a room is O(n^2), as the number of greetings scales quadratically with the number of people.


Replies

henrymerrilees • today at 9:05 AM

And for anyone googling along at home: in this case, google also "big-theta" (bounded above and below, up to constants), and note that the hn headline at time of writing--"Matrix Multiplication is Θ(n^2.25)"--is not quite right.