0.3 Common Substring
(RankList for this Question)
Score: 10pts
Time Limit: 2.00 sec
You will be given t inputs, for each input write a function that takes two strings and checks whether they have any common substring. If they have at least one common substring* print Yes else print No.
(Substring - https://en.wikipedia.org/wiki/Substring)

Constraints
All characters in the String are in lowercase

Input Format
t - no. of inputs (Integer)
input 1
input 2
.
.
input t

Output Format
Yes if the particular input has a common substring else No.

Example 1
Input:
3
abc aac
zyz aby
xyz aaa

Output:
Yes
Yes
No

Explanation:
The first input has at least 1 common substring.
The second input has at least 1 common substring.
The third input has 0 common substrings.

Log In to solve the Question