Talk:TADM2E 4.2

From Algorithm Wiki
Revision as of 16:32, 8 November 2014 by Cbaby (talk | contribs)
Jump to: navigation, search

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?