# Sorting a Million Songs, and the Playlist You Can't Compute: O(n log n) and O(2ⁿ)

See why a good sort handles a million songs in under a second while the obvious ways take most of a day, and why a playlist that fills exactly 60 minutes can't be found by trying every combination: O(n log n) and O(2ⁿ).

![Cheat sheet: Sorting a Million Songs, and the Playlist You Can't Compute: O(n log n) and O(2ⁿ)](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8f48d1b6fbbd4b9e8aee903041d30701.webp)

- Category: Data Structures
- Level: Apprentice
- Tags: Big-O Notation, Exponential Time, Linearithmic Time, software-development
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/big-o-n-log-n-and-exponential-cheat-sheet
