Big-O は input size n が増えるにつれて、algorithm の running time や memory がどう増えるかを表します。constants と lower-order terms を無視し、主に worst-case の asymptotic behavior を捉えます。
考え方
正確な step count ではなく growth rate を見ます。O(2n + 5) は O(n) です。n が大きくなると constant と小さい term は重要でなくなるからです。
