Please have a look over my code!
Thanks in advance!
I am getting wrong answer with my code, Problem: Murthal Parantha
@rkrishna can you explain the logic behind your ub
? I am assuming it is the upperbound value.
according to me the upperbound should be p(p+1)a[n-1]
i am assuming here that a is sorted, so a[n-1] will hold the maximum value
no! that is bad upper bound if a one uses smalest a[0] then it is better ub!
by the way I have rectified the issues it was with recursive call of function
thanks
already done!
thanks
1 Like