📄️ 4.1 Common Sorting Algorithms
Although sorting can be achieved in C++ and Python using the sort function and it is rare to write sorting algorithms manually during coding challenges, understanding various sorting algorithms helps deepen your knowledge of basic algorithms and solve problems derived from these algorithms. Here, we introduce two sorting algorithms with a time complexity of $O(n \log n)$: Quick Sort and Merge Sort. The former is generally faster, while the latter ensures that elements with the same value maintain their relative order in the array (i.e., it is a "stable sort").
📄️ 4.2 Quick Select
215. Kth Largest Element in an Array
📄️ 4.3 Bucket Sort
347. Top K Frequent Elements
📄️ 4.4 Exercises
Basic Difficulty