Algorithms | Recursion | Question 2
Consider the following recursive function fun(x, y). What is the value of fun(4, 3)
Explanation: The function fun() calculates and returns ((1 + 2 … + x-1 + x) +y) which is x(x+1)/2 + y.
Quiz of this Question
My Personal Notes arrow_drop_up
Please Login to comment...