diptangsu / diptangsu/Sorting-Algorithms

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

Ouverte
#197 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
171
Forks
165
Métriques de merge des PR
Aucune PR mergée en 30 j

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.