Company: Epam_11oct
Difficulty: medium
Common Substring in Usernames Problem Description A person is creating multiple accounts on DoSelect using different usernames. Since all usernames belong to the same person, there should be some similarity between them. Given an array of 3 usernames and an integer k , determine if there exists a common substring of length at least k that appears in all three usernames. Return "YES" if such a common substring exists. Otherwise, return "NO". Note: The string characters are case sensitive. Examples Example 1: Input: 3 bowinedown downtownbowing gamingdowntown 4 Output: YES Explanation: There is a common string 'down' in all the usernames with a length of 4. Therefore, YES. Example 2: Input: 3 johnsmith johnsnow JOHNNdoe 4 Output: NO Explanation: No common substring of length 4 or more exists in all three usernames. For example, 'john' is common to the first two, but 'JOHNNdoe' differs due to case sensitivity and the extra 'N'. Hence, NO. Constraints 1 <= k <= len(username[i]) 1 <