|
|
вернуться в форумeven no idea tried this 10 3 5 6 7 2 8 9 7 5 6 5 get 5 My error was that I didn't check after the end of the loop if my current numbers of swaps is bigger than the now kept max . Try this test : 8 2 3 4 1 5 6 7 8 Answer : 4 check this test: 7 2 3 4 1 5 6 7 Answer : 4 |
|
|