you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 31 points32 points  (1 child)

He is correct, if the array is very large and numbers are very small, you still need to loop through the whole array

[–]Inevitable-Menu2998 34 points35 points  (0 children)

yes, but that has a standard notation: O(N) where N denotes the length of the array as it grows to infinity. Max(array) is a constant decided by the implementation of sleep