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.
Press Submit to check your solution.
Back to lesson: Practice: 2D array lab