Company: Epam_11oct
Difficulty: medium
Common Substring in Usernames Problem Description A person is creating several accounts on an online assessment platform, each with a different username. Because every username belongs to the same person, the usernames are expected to share some similarity. You are given exactly 3 usernames and an integer k . Decide whether there is a common substring of length at least k that appears in all three usernames. A substring is a block of consecutive characters of a string. For example, "own" and "town" are substrings of "downtown" , but "dwn" is not. The common substring may start at a different position in each username. Implement sameUsername(username, k) , which receives the list of the three usernames and the integer k , and returns the string "YES" if such a common substring exists and "NO" otherwise. Note: Characters are case-sensitive, so 'a' and 'A' are different characters. Input Format The first line contains the integer 3 , the number of usernames. Each of the next 3 lines conta