Zig Zag Sequence

  • + 1 comment

    the example in the description is intentionally vague and wrong, the lexicographically smallest arrangement is 1,2,5,4,3 not 1,4,5,3,2

    problem is much easier to solve understanding this because the constraint limits how complex you can be on implementation