Search⌘ K

Challenge 1: Average of Numbers

Explore how to implement a recursive function to compute the average of all numbers in an array. Understand the process of summing elements recursively and dividing by the total count to find the average, preparing you to solve similar recursion problems with arrays.

Problem Statement

Implement a function that computes the average of all the numbers in an array.

If we have nn numbers and each number is denoted by aia_i (wherei=0,1,2,...,n1)(where \: i = 0, 1, 2, ..., n-1) ...