using n-1 here only works for this example, but if we have a different array it wouldn't work isn't??
@PortfolioCourses2 жыл бұрын
No, n-1 is how the algorithm works for all arrays. :-) There is some more description of how the algorithm works in the comment at the bottom of the code: github.com/portfoliocourses/c-example-code/blob/main/recursive_array_average.c.