Code not working for testcase 1 while submit it
your approach and logic is correct there is small mistake
see it inside the code i have modified it.
even after your modification code is not submitting.
plz check, 
your approach and logic is correct there is small mistake
see it inside the code i have modified it.
even after your modification code is not submitting.
plz check, 