(Java) 14.11 Variant

#1

Hi,

The variant of problem 14.11 asks to solve the problem in constant space. But that’s what the main problem’s solution does.

0 Likes

#2

you are correct, and i have removed the variant. thanks for pointing that out.

i think our original solution used sorted inputs and a prefix sum array which we did away with, giving the O(1) space solution implied by the variant.

cheers,
adnan

0 Likes