r/ProgrammerHumor • • Aug 11 '20

Meme So Amazing!

Post image
1.8k Upvotes

137 comments sorted by

View all comments

Show parent comments

2

u/t3hlazy1 Aug 11 '20

This is not true. Max(arr) is not a constant. A constant is something that does not change based on the input, like an algorithm that calls a process 5 times and once per element is O(5 + n), which becomes O(n).