Checkpoint: recursive count
Challenge on lesson: Checkpoint: recursive count
CHALLENGE
Difficulty: beginner+25 XP
Implement int countChar(String s, char c, int i) recursively: occurrences of c in s from index i onward. Empty remainder โ 0; s.charAt(i) == c adds 1.
Press Submit to check your solution.
Back to lesson: Checkpoint: recursive count