Please have a look at my code and suggest as in what needs to be done
The test case is not going through
Hey @sknrash123_211566f624d672c3 There is a very slight change that you have to make in the sum function of yours goto condition of while loop your condition is left <= right you just have to remove = and write it as left < right. This change is necessary bcoz when left = right that means you are using same element twice to get the sum which is invalid.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.