Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What you need to do: 1. Write a recursive function computeSum that adds up the sequence of numbers from 1 to N. For example, computeSum(4)
What you need to do: 1. Write a recursive function computeSum that adds up the sequence of numbers from 1 to N. For example, computeSum(4) should return 1+2+3+4 = 10, Your function signature should look like: o int computeSum(int n) 2. Write a recursive function findMin that finds the minimum (smallest) number in an array of integers. For example, given the array (12, 21,27, 3, 11, 19) findMin should return 3. Your function signature should look like o int findMin(int arr[, int len) o Note: len is the length of the array 3. Write a function template called printArray that uses recursion prints an array in order. Once again, the function signature can take the length of the array: o void printArray(int arr], int len) o Note: len is the length of the array 4. Write a function template called printArrayRev that uses recursion to print an array in reverse order. Once again, the function signature can take the length of the array: o void printArrayRev(int arr, int len) o Note: len is the length of the array (SEE NEXT PAGE)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started