Sorting-Algorithms icon indicating copy to clipboard operation
Sorting-Algorithms copied to clipboard

SelectionSort.c is totally wrong , the logic implemented is different from selection-sort

Open wassim31 opened this issue 3 years ago • 2 comments

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.

wassim31 avatar Jul 30 '21 16:07 wassim31

Can i add logic for Selection Sort in C language.

harshit0015 avatar Dec 27 '21 08:12 harshit0015

I've already sent a PR but no response.

wassim31 avatar Dec 28 '21 01:12 wassim31