Code fails two test cases. I am not able to figure out why

@somesh.ps there is just a small error in your code i have updated and commented it look here (https://ide.codingblocks.com/s/213743)