Please help to resolve the code


as it is not accounting for 2 test cases