It is quite reasonable to limit the average case O to the most common inputs with the caveat that it can be worse otherwise. It’s not like every arithmetic operation is counted as O(n) in Python for example as you aren’t expected to use numbers larger than 2^32 often
It is quite reasonable to limit the average case O to the most common inputs with the caveat that it can be worse otherwise. It’s not like every arithmetic operation is counted as O(n) in Python for example as you aren’t expected to use numbers larger than 2^32 often