Question:
Write a program to delete a fragment that occurs in all “lines”, where the fragment is 3 or more consecutive words.
Example:
Input ::
s1 = "It is raining and I want to go home."
s2 = "It is raining and I want to ski."
s3 = "It's hot and I want to swim."
Output::
s1 = "Rain is coming home.";
s2 = "It's raining on skis."
s3 = "Hot swimming."
Remote fragment = "and I want"
The program will again check large files. Efficiency will be taken into account.
Assumptions: Ignore capitalization, punctuation. but saved on exit.
Note: Take care of cases such as
a a a a a b c b c b c b c, .
: ( )
.
. (k * nlogn)
k . . else , .
. , , .
, ? / ?