It would be really helpful if you could figure out the problem in my code as its only passing for 3/5 test cases.
refer to this here https://ide.codingblocks.com/s/334142