|
|
|
|
|
by justinpombrio
484 days ago
|
|
> Why is there any difference? Does the entire difference come from the iteration where i = 1? Sometimes it's more swaps, and sometimes it's less. The vague pattern looks like Can't Believe Sort does slightly fewer swaps on larger lists, but that could also have been noise. Why do you expect them to have exactly the same number of swaps? > Bubble sort can do less than this. Oh sorry yeah, I implemented bubble sort without any sort of early return, for a more direct comparison. |
|