You are viewing a single comment's thread. Return to all comments →
c#
var s1 = Console.ReadLine().Distinct(); var s2 = Console.ReadLine().Distinct();
if (s1.Intersect(s2).Any()) Console.WriteLine("YES"); else Console.WriteLine("NO");
Two Strings
You are viewing a single comment's thread. Return to all comments →
c#
var s1 = Console.ReadLine().Distinct(); var s2 = Console.ReadLine().Distinct();
if (s1.Intersect(s2).Any()) Console.WriteLine("YES"); else Console.WriteLine("NO");