What’s Up with O(1)?
The problem is that people are really sloppy with terminology. There are 3 important but distinct classes here: O(1) worst-case This is simple – all operations take no more than a constant amount of time in the worst case, and therefore in all cases. Accessing an element of an array is O(1) worst-case. O(1) amortized … Read more