diptangsu / diptangsu/Sorting-Algorithms
SelectionSort.c is totally wrong , the logic implemented is different from selection-sort
- Dominant language
- Java
- Stars
- 171
- Forks
- 165
- PR merge metrics
- No merged PRs in 30d
Description
In C folder , SelectionSort.c , the logic implemented is similar to BubbleSort.c instead of real logic of selection-sort which is the following :
Finding the smallest element in the array , swap it's location with the first element in the array , and doing that until the array is sorted .
But in the following code d7f36262703dea197a1b4f818ff87fbd64db3d3a , they're comparing adjacent elements , j and j+1.
Contributor guide
Research direction
Start with C/SelectionSort.c and compare its logic with C/BubbleSort.c at commit d7f36262703dea197a1b4f818ff87fbd64db3d3a. Confirm the implementation follows selection sort by choosing the smallest remaining element and swapping it into place, then verify that the file sorts representative arrays correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- data
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100