Topic: Greedy Algorithm Problem / Level: beginner

Problem: Find the minimum number of steps required to make an array sorted in non-decreasing order using only adjacent swaps.

Run the code to see the output here...