Software Engineering ยท Performance
A way of describing how an algorithm's run time or memory use grows as its input size grows, ignoring constant factors.
Example: Saying a linear search is O(n) because checking twice as many items takes roughly twice as long, versus O(1) for a hash lookup that takes the same time regardless of size.
In practice: It describes growth trends, not actual speed โ an O(n) algorithm can outperform an O(log n) one for small inputs once constant factors and real-world overhead are accounted for.