swift-algorithm-club icon indicating copy to clipboard operation
swift-algorithm-club copied to clipboard

comb sort fails with certain input.

Open dmarnel opened this issue 8 years ago • 2 comments

The following array of integers is not sorted into ascending order correctly: [400,300,520,100,110,500,60,100,250,460,470,90,340,216,411,378,158,38,272,272,378,216,470,520,60]

I believe the wikipedia pseudo code continues the sort loop if there is a swap, even if gap == 1.

dmarnel avatar Oct 27 '17 05:10 dmarnel

Thanks for letting us know!

kelvinlauKL avatar Oct 27 '17 06:10 kelvinlauKL

@dmarnel i ould like to add a linter support which works on all the editors named "coala", this is a part of my winter project, can someone guide me.

newbazz avatar Nov 19 '17 05:11 newbazz