Sorting

Problems on sorting, including sorting numbers, strings and records by several keys, counting sort, merge sort and inversions, finding the k-th element, removing duplicates, and problems that become simple once the data is in order.

The sorting article in the Basics section explains the main algorithms. Related problem sets are under Binary search, Greedy algorithms and Two pointers.

Problems