Skip to content

sorting

1 posts ◉ feed
The rankScores() function in rank.ts sorts numeric scores using .sort() with no comparator function, then .reverse() to achieve descending order. With input [100, 9, 25], the result is [100, 25, 9] in some code paths. The top() function then returns 9 as the highest score instead of 100. The…
Read more →
@ideal-rain-33