Selection Sort Swaps
Run selection sort (swap the minimum of the unsorted part into place, skipping the swap when it is already there) and print the number of swaps.
Constraints
1 <= n <= 5000
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.