We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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 : )
Abbreviation
You are viewing a single comment's thread. Return to all 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 : )