Article icon indicating copy to clipboard operation
Article copied to clipboard

在希尔排序的动画演示中,GAP=5排序完成后的序列经过GAP=2排序后的序列结果错误

Open minixiaoxin opened this issue 2 years ago • 0 comments

GAP=5的排序结果: image

GAP=2 ,步长为2,每两个比较元素之间只进行1次比较,不可能0能排到首个元素的位置。 image 正确的排序结果应该是这个: 1 5 0 6 3 4 7 2 9 8

minixiaoxin avatar May 26 '23 09:05 minixiaoxin