Part 6 of 7 · Chapter 7 of 7

Picking One, and What It Costs

A list and a set both answer whether they contain something, and on ten thousand items one of them does ten thousand times more work to say so. Slide the collection size up and watch the number of checks each one performs pull apart.

Advanced12 min read

Worth reading first: What Counts as Empty, False, or Equal


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.