We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I think this problem can be solved by finding the smallest number of swaps so that it becomes an increasing chain, but this number of swaps must be divisible by 2 because in this lesson, each time you swap, you have to swap consecutively. swap 2 times in a row and if those times are numbers that are not divisible by 2 then it will be incorrect because in 1 swap you cannot swap 3 times in a row in 1 time.
Larry's Array
You are viewing a single comment's thread. Return to all comments →
I think this problem can be solved by finding the smallest number of swaps so that it becomes an increasing chain, but this number of swaps must be divisible by 2 because in this lesson, each time you swap, you have to swap consecutively. swap 2 times in a row and if those times are numbers that are not divisible by 2 then it will be incorrect because in 1 swap you cannot swap 3 times in a row in 1 time.