Sorting is a useful technique for solving algorithm problems. The sorted data allows things like e.g, O(log n) searches.
Example Problems
- Detecting duplicates
- Detecting anagrams: two strings are anagrams if sorting them produces the same result
- Merging intervals
- Non-overlapping intervals