Skip to content

Commit

Permalink
contents(algo): add Java implementation details for platform sorting …
Browse files Browse the repository at this point in the history
…algorithms (#585)
  • Loading branch information
hakanserce committed May 11, 2023
1 parent a56d9c5 commit cfd56cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/website/contents/algorithms/sorting-searching.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ While you're unlikely to be asked to implement a sorting algorithm from scratch

## Things to look out for during interviews

Make sure you know the time and space complexity of the language's default sorting algorithm! The time complexity is almost definitely O(nlog(n))). Bonus points if you can name the sort. In Python, it's [Timsort](https://en.wikipedia.org/wiki/Timsort).
Make sure you know the time and space complexity of the language's default sorting algorithm! The time complexity is almost definitely O(nlog(n))). Bonus points if you can name the sort. In Python, it's [Timsort](https://en.wikipedia.org/wiki/Timsort). In Java, [an implementation of Timsort](https://github.com/openjdk/jdk/blob/d9052b946682d1c0f2629455d73fe4e6b95b29db/src/java.base/share/classes/java/util/TimSort.java) is used for sorting objects, and [Dual-Pivot Quicksort](https://github.com/openjdk/jdk/blob/d9052b946682d1c0f2629455d73fe4e6b95b29db/src/java.base/share/classes/java/util/DualPivotQuicksort.java) is used for sorting primitives.

## Corner cases

Expand Down

0 comments on commit cfd56cf

Please sign in to comment.