Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | stdlib: Handle various corner cases in the fallback heapsort for qsort | Florian Weimer | 2023-11-21 | 1 | -0/+134 |
The previous implementation did not consistently apply the rule that the child nodes of node K are at 2 * K + 1 and 2 * K + 2, or that the parent node is at (K - 1) / 2. Add an internal test that targets the heapsort implementation directly. Reported-by: Stepan Golosunov <stepan@golosunov.pp.ru> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> |