Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Spot the bug
/
CS foundations
/
Sorting and searching
Spot the bug in response-time ranking
from Sorting and searching
Node 24
beginner
4 min
1 issue to find
Find the bug in this response-time ranking.
JavaScript
Copy
const
responseTimes
=
[
2
,
11
,
3
];
const
ranked
=
responseTimes
.sort
();
console
.log
(ranked);
Reveal
Copy code
Open in playground
Ask AI about this kata
Report an error
previous kata
Binary search finds an insertion position in a sorted array in O(log n). Why can the comp…
Quiz
next kata
What does a stable sort guarantee when two distinct records compare equal?
Quiz
A new version is available
Reload