question link:https://hack.codingblocks.com/contests/c/547/1045
Since DP hasn’t done yet by Prateek bhaiya and this question is of recursion in online Course, I tried to do it using only recursion without DP but got time limit exceeded. Can I do it only using recursion?
Code link without DP: https://ideone.com/78vdAO