my code is giving correct output for sample test case but is failing all of the test cases.i also runned it for some other cases it’s working fine.also i saw some other solution they are also almost same.can you please tell what i am missing
Failing test cases
just add a new line for every test case