You are viewing a single comment's thread. Return to all comments →
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
Seems like cookies are disabled on this browser, please enable them to open this website
Zig Zag Sequence
You are viewing a single comment's thread. Return to all comments →
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