• + 3 comments

    Very good solution. However it fails for the input a="NoK", b="K" . ( Prints YES where as it should be NO ) ( Which can be fixed with a single line of code )

    I got curious and tried this algorithm against hackerrank testcases and it received perfect score. Interesting, they missed it or I am missing something : )