For n=100 top down is giving ans = 7 while bottom up is giving 6 as answer.
Please check which one is wrong
Different answer for both approches
got it, n was to be replaced by i XD
For n=100 top down is giving ans = 7 while bottom up is giving 6 as answer.
Please check which one is wrong
got it, n was to be replaced by i XD