You are viewing a single comment's thread. Return to all comments →
Check it for reverse array1: 1 3 5 2 - it require two swaps. We are only taking min of ascending and descending.
Seems like cookies are disabled on this browser, please enable them to open this website
Lily's Homework
You are viewing a single comment's thread. Return to all comments →
Check it for reverse array1: 1 3 5 2 - it require two swaps. We are only taking min of ascending and descending.