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.
I too was tripped up by the instructions, but it was because I did not think about the problem carefully enough before coding. Obviously, if two strings share a common substring with a length greater than 1, then they also share a common single character. So there is no need to search for any substrings with length greater than 1.
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 →
I too was tripped up by the instructions, but it was because I did not think about the problem carefully enough before coding. Obviously, if two strings share a common substring with a length greater than 1, then they also share a common single character. So there is no need to search for any substrings with length greater than 1.