# Move letters

Logic Level 2

You have 2017 cards numbered $$1, 2, 3, \ldots, 2017$$, as shown above. In each move, you can swap two adjacent cards.

What is the minimum number of moves required for the above cards to be arranged backwards as $$2017, 2016, \ldots, 2, 1$$?

As an explicit example, if you started with four cards arranged as 1234, in one move you could go to 2134, 1324, or 1243 only.

×