Time and space complexity: Big-O notation
Data Structures · Engineering
Study notes
An algorithm does n2/2 + 3n + 10 operations. Drop constants and lower terms: O(n2). For n = 1000, that's ~500,000 ops; an O(n log n) rival does ~10,000. At n = 10 both are trivial. Big-O describes scaling, which is why it matters for large inputs.