Instead of focusing on units of time, Big O achieves consistency by focusing only on the number of steps that an algorithm takes.
In Chapter 1, Why Data Structures Matter, we discovered that reading from an array takes just one step, no matter how large the array is. The way to express this in Big O Notation is:
Many pronounce this verbally as “Big Oh of 1.” Others call it “Order of 1.” My personal preference is “Oh of 1.” While there is no standardized way to pronounce Big O Notation, there is only one way to write it.
O(1) simply means that the algorithm takes the same number of steps no matter how much data there is. In this case, reading from an array always takes just one step no matter how much data the array ...