You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have prudently went through the source code, but I found a problem(maybe) when I use the following data: {42, 20, 17, 13, 28, 14, 23, 15}, I think there are other WRONG data like this. In my opinion, that's because in the last sort loop, the arr is 28 42 23 20 17 15 14 13, and the heap left is 28 42, so it does not satisfy the condition to swap 28 & 42, but actually 28 42 is not in the right order.
The text was updated successfully, but these errors were encountered:
I have prudently went through the source code, but I found a problem(maybe) when I use the following data: {42, 20, 17, 13, 28, 14, 23, 15}, I think there are other WRONG data like this. In my opinion, that's because in the last sort loop, the arr is 28 42 23 20 17 15 14 13, and the heap left is 28 42, so it does not satisfy the condition to swap 28 & 42, but actually 28 42 is not in the right order.
The text was updated successfully, but these errors were encountered: