Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: arrays

โญ beginnerโณ 22 min read๐Ÿ“ Lesson 36 of 256

Count-and-fill filtering into a right-sized new array.

trimNegatives is the two-pass pattern (count, then fill) the exam uses whenever a fixed-size array must hold an unknown number of results. The wrong solution to avoid: destroying the source while building the target.