You are viewing a single comment's thread. Return to all comments →
It's definitely not elegant but here's my Python 2.7 solution
n = raw_input() n = int(n)
for i in range(0, n):
s1 = set(raw_input()) s2 = set(raw_input()) result = s1.intersection(s2) if not result: print 'NO' else: print 'YES'
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 →
It's definitely not elegant but here's my Python 2.7 solution
n = raw_input() n = int(n)
for i in range(0, n):