You are viewing a single comment's thread. Return to all comments →
This worked for me, and did not give a Time out error on the last test case
Here's a formatted one for the custom method they have:
C#
var distS1 = s1.Distinct(); var distS2 = s2.Distinct(); if (distS1.Intersect(distS2).Any()) { return "YES"; } else { return "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 →
This worked for me, and did not give a Time out error on the last test case
Here's a formatted one for the custom method they have:
C#