Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Distinguish between operating mergers and financial mergers.

Answered: 1 week ago