Permutation Sorting Game
Alice and Bob have a permutation of size $N$, so they started playing a game on it. **They both have their own copies** of an initial permutation on which they perform moves in turns. Note that although Bob's and Alice's permutations are initially similar in values, **they are the not the same permutation**; any move Alice makes only changes her permutation and not Bob's, and vice versa. Alice go
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start