Sort a shuffled shelf numbered 1 to n with the fewest swaps by following its cycles

mediumAbout 30 minutesUpdated CodingPropermutationscycle-detectionarraysgreedy
Not solved

Share this question

Problem

Private, and saved in this browser as you type. All your notes are on My lists.

Every question and answer7 days, one payment