Couldn't find why the code is not working
give me some time i’ll check your code
at line 14 and 23 you should initialize the value of r[i] and l[i] outside of inner loop as in your case it is getting initialized again and again
I have corrected your code : https://ide.codingblocks.com/s/182369
In case of any doubt feel free to ask 
mark the question as resolved if you got the answer
1 Like
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.
1 Like