diptangsu / diptangsu/Sorting-Algorithms

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

オープン
#197 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
171
フォーク
165
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。