Question: Problem Statement The person is trying to make various accounts on DoSelect with different Usernames. Given that he's the same person there is supposed to

Problem Statement
The person is trying to make various accounts on DoSelect with different Usernames. Given that he's the same person there is supposed to be some similarity between the usernames. Given 3 usernames and a value k, find if there is a common substring between all the usernames of length at least k.
Return 'YES' if there is a common substring of length k else return 'NO'.
Input Format
First-line contains 3, the number of usernames.
Next, 3 lines contain n usernames of an array username.
Last line contains the integer k.
Constraints
1k len(username)
1 len (username [i]
Output Format
Return 'YES' or 'NO' based on the conditions.
Evaluation Parameters
Sample Input
 Problem Statement The person is trying to make various accounts on

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!