Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

BTreeSet

A set that keeps its values in sorted order.

BTreeSet is the ordered counterpart of HashSet: unique values, iterated in sorted order, with range queries.

Loading interactive…

Examples

  • For a BTreeSet of 36, 38, 40, 42, 44 and 46, sizes.range(38..=44) yields 38, 40, 42 and 44 in order.

Read the full section →