Skip to content

Comment on Why should I have written ZeroMQ in C, not C++ (part II)parent

Comments

There's no such thing as 'O(n/2)', big-O notation is about worst-case complexity. O(n) means 'linear time in the number of elements', not 'n operations' or something.

But in practice, the amortized time complexity will indeed usually be half of the worst-case scenario when removing elements from a vector.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.