Not passing all test cases

I have edited your code… Logic was correct… only slight changes I have made…
Try to submit it now…