Difference between revisions of "Talk:TADM2E 4.2"

From Algorithm Wiki
Jump to: navigation, search
 
Line 1: Line 1:
a) Couldn't we just keep track of minimum and maximum value encountered while iterating through array?
+
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?
 

Latest revision as of 17:22, 8 November 2014

a) Couldn't we just keep track of minimum and maximum value encountered while iterating through array?