I only put “if it’s big” to help readers imagine a large pile and how it would become more inconvenient the larger the pile. Language is not as precise as math or programming. If you’d like you can imagine the sentence as saying something like “imagine a big pile. It’s definitely not O(1)”
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
I mean, if structure is O(1) for low N, it’s still O(1) for high N. If O “changes” from 1 to N with size then it’s never been 1. All I’m saying
is not how you identify correct O
I only put “if it’s big” to help readers imagine a large pile and how it would become more inconvenient the larger the pile. Language is not as precise as math or programming. If you’d like you can imagine the sentence as saying something like “imagine a big pile. It’s definitely not O(1)”
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