Part 6 of 7 · Chapter 1 of 7

Sorting, Slicing, and the Methods That Return Nothing

Sorting a list of names is one function call, right up until the names have capital letters in them and the answer is quietly wrong. Sort the same list four ways, changing only the key, and watch the order rearrange itself under each rule.

Intermediate11 min read

Worth reading first: Ordered Collections, Two Ways


Make a free account to read on

Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.