You are viewing a single comment's thread. Return to all comments →
Great solution .. Liked it tried to simplify more and it looks like this
private static String twoStrings(String s1, String s2) { return IntStream.rangeClosed('a', 'z') .filter(c -> s1.indexOf(c) != -1 && s2.indexOf(c) != -1) .findFirst() .isPresent() ? "YES" : "NO"; }
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 →
Great solution .. Liked it tried to simplify more and it looks like this