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.
This is really nice solution. Just one problem though(assuming above code is in JAVA ) if you give input bac , b . It still returns NO . check should be (not equal to -1). This will fix the problem.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Two Strings
You are viewing a single comment's thread. Return to all comments →
This is really nice solution. Just one problem though(assuming above code is in JAVA ) if you give input bac , b . It still returns NO . check should be (not equal to -1). This will fix the problem.