Skip to main content

Practice · 3 of 5

Q4: neighborhood transform

CHALLENGE
Difficulty: intermediate+25 XP

Implement sameCount with the two-grid pattern: each output cell counts orthogonal neighbors equal to it. Corners count at most 2, edges 3, interior 4.

Back to lesson: Practice: FRQ 2D array lab