diptangsu / diptangsu/Sorting-Algorithms

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

未关闭
#197 2 条评论 0 个 reaction 已指派 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.

贡献指南

打开贡献指南

调研方向

从 C/SelectionSort.c 开始,将其逻辑与 commit d7f36262703dea197a1b4f818ff87fbd64db3d3a 中的 C/BubbleSort.c 进行比较。确认该实现遵循选择排序:选出剩余元素中最小的元素并将其交换到正确位置,然后验证该文件能正确地对具有代表性的数组进行排序。

由索引模型根据 Issue 内容生成。

评估

技术栈
c
领域
data
Issue 类型
缺陷
难度
1/5
预计耗时
1 小时以内
活跃度
停滞
描述清晰度
描述清楚
新手友好度
50/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。