Given a paragraph of text, write a program to find the first shortest 
sub-segment that contains each of the given k words at least once. A 
segment is said to be shorter than other if it contains less number of 
words.

Ignore characters other than [a-z][A-Z] in the text. Comparison between the 
strings should be case-insensitive.

If no sub-segment is found then the program should output “NO SUBSEGMENT 
FOUND”.

-- 


Reply via email to