EPIJ 17.4 3-Sum Problem - Variant 3,4 - Typos?

#1

Hi,

I’d like clarification on two variants of 17.4:

  1. Variant 3 constrains that A[p] <= A[r] <= A[s]. But s isn’t mentioned in the problem description. Only p, q, and r are. Should the constraint be A[p] <= A[q] <= A[r]? Variant 4 seems to suggest so, since it is similar to the variant 3 problem, but constrains that A[p] <= A[q] <= A[r].

  2. If the Variant 3 and 4 constraints are A[p] <= A[q] <= A[r], there may still be an issue with their problem statements. That’s because any order of 3 numbers can be rearranged to satisfy this constraint. But if so, doesn’t that make the constraint irrelevant?

Thanks!

0 Likes