Talk:TADM2E 4.2
From Algorithm Wiki
a) Couldn't we just keep track of minimum and maximum value encountered while iterating through array? c) Wouldn't sorting with n log n, then scanning through the array for the pair in question actually be O(n^2) complexity?