Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
create circle_sort.go #112
Conversation
|
issue #2129 |
| func circle_sort(arr[] int, start int,end int, swaps int)int{ | ||
| s := start | ||
| e := end | ||
| mid := (end - start)/2 |
brayo-pip
Jul 6, 2020
Collaborator
this is wrong, (end-start)/2 != (start +end)/2... I understand you are trying to avoid the overflow errors. The correct implementation would be mid := start+(end-start)/2 or mid := end-(end-start)/2
| mid := (end - start)/2 | |
| mid := start + (end-start)/2 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

No description provided.