Problem 6 - Highly Recursive Function F(n)
CodeChefOpen on judge ↗
Professor Plums likes recursion, but his students typically find it confusing. During a recent faculty meeting his mind wandered, and he invented the following recursive mathematical function, F(n): - F(n) = F(n+15) + F(n+10) – F(n+5) for all value of n < -20 - F(n) = n*3 for all value of -20 $\leq$ n $\leq$ -10 - F(n) = F(n-7) - F(n-2) for all values of n > -10. He wants you to write a pr
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start