Akuna Capital logoAkuna Capital
CodingMembers

Minimum Swaps to Sort (Cycle Decomposition)

Members only

Akuna intern OA classic: find the minimum number of arbitrary-position swaps to sort an array. Different sittings ask for ascending or descending order and may include duplicate values, which changes how you assign targets. It is one of the rotating slots in the QR/SWE intern coding set, so it is worth having the cycle-decomposition reasoning ready cold.

SWE
RS
cycle-detection
sorting
array
greedy
medium
Frequency
Medium
Last asked
2025-12-20
Stage
oa

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...