Sorting and searching
Know the main sorting algorithms, their trade-offs and binary search.
- DSA.04.01Elementary sorts and stabilityCoreJuniorBeing written
- DSA.04.02Merge sort, quicksort and heapsortCoreMid-levelBeing written
- DSA.04.03Sorting in JavaScriptCoreJuniorBeing written
Interview questions in this module
- Compare merge sort and quicksort.
- What does it mean for a sort to be stable? Is JavaScript's sort stable?
- What algorithm does V8 use for
sort? - Why does
[10, 9, 1].sort()return[1, 10, 9]? - When can you sort faster than O(n log n)?