Big-O

ComplexityExample
O(1)array index, hash lookup
O(log n)binary search
O(n)linear scan
O(n log n)merge / quick sort (avg)
O(n²)bubble / nested loops
O(2ⁿ)naive recursion (fib)

Space: count extra memory — recursion depth counts too.

Rule: drop constants and lower terms. Nested loops multiply, sequential loops add.

Need more depth? Ask JERVIS on the Core page — e.g. "Explain Big-O with an example".