Array
1464. Maximum Product of Two Elements in an Array
The answer is (a-1)*(b-1) where a and b are the two largest values, so I never inspect a single pair — the top two elements alone decide it.
Loading…
The answer is (a-1)*(b-1) where a and b are the two largest values, so I never inspect a single pair — the top two elements alone decide it.
Loading…