Hacker News new | ask | show | jobs
by linuxftw 450 days ago
That's just moving the problem elsewhere. Since the smallest possible value is a possible value, then it may be present in the array, or it may not actually be present in the array. The caller would have to determine which case is which by testing for the length of the array, which if done, negates the entire utility of returning the smallest possible value.