Array Partition

  • + 1 comment

    "Note that {1, 3} will always be placed together and {1, 2} will also be placed together always. As {1} is common, therefore {1, 2, 3} will always be placed together otherwise gcd wont be 1." I don't understand this clearly ? {1,2} isn't placed together in the previous statement.

    • + 0 comments

      Guess there is a typo in the statement. If I understand the editorial correctly, {1, 2} may need to be replaced with {2, 3} and then {1} would be repalced with {2}.