Skip to main content

Practice · 2 of 5

Recursive reverse print

CHALLENGE
Difficulty: intermediate+25 XP

Implement void printRev(int[] arr, int i) to print arr from END to START, one per line, starting from i = 0. The recursive call comes BEFORE the print — code after the call runs on the way up. Empty arrays print nothing.

Back to lesson: Practice: Recursion lab