Skip to main content

Practice · 2 of 5

Count cells

CHALLENGE
Difficulty: intermediate+25 XP

Implement int countValue(int[][] grid, int value): how many cells equal value. Row-major double loop; the for-each form over rows also works.

Back to lesson: Practice: 2D array lab