• + 4 comments

    I did it this way, simlar to what you have done

    image

    But its showing wrong answer, even though my output is same as was expected, same is happening for testcase1 as well, "feedthedog".

    image