Description: You are given an array of integers. Your task is to print all the elements of the array using recursion only. You are not allowed to use any loops such as for or while
Example 1
Input: arr[] = [1,2,3.4,5]
Output: 1 2 3 4 5
Explanation: No Need
Example 2
Input: arr[] = [7,4,1,8,5]
Output: 7 4 1 8 5
Explanation: No Need
Approach, complexity and clean code in every language. Sign in to unlock the editorial.
Your submissions, results and runtime history live here. Sign in to start your streak.
5 10 15
5 10 15
7
7
3 1 4 1 5
3 1 4 1 5