Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: middle pair

โญโญโญ advancedโณ 15 min read๐Ÿ“ Lesson 180 of 256

The index-arithmetic checkpoint: one formula must serve both parities.

Index arithmetic is where string points are won. (n - 1) / 2 is the one formula that handles both parities โ€” but only if you trust it over your first instinct (n / 2), which is exactly what the wrong-looking answer tests.