A community for students.
Here's the question you clicked on:
 0 viewing
 2 years ago
Given a list of words, L, that are all the same length, and a string, S, find the starting position of the substring of S that is a concatenation of each word in L exactly once and without any intervening characters. This substring will occur exactly once in S.
The first line of input specifies L, it will contain between 1 and 100 spaceseparated words, each between 1 and 10 characters long.
The second line of input specifies S, the line will contain a single word up to 1 million characters long.
The characters in both L and S should be treated as casesensitive.
 2 years ago
Given a list of words, L, that are all the same length, and a string, S, find the starting position of the substring of S that is a concatenation of each word in L exactly once and without any intervening characters. This substring will occur exactly once in S. The first line of input specifies L, it will contain between 1 and 100 spaceseparated words, each between 1 and 10 characters long. The second line of input specifies S, the line will contain a single word up to 1 million characters long. The characters in both L and S should be treated as casesensitive.

This Question is Closed

g152xx
 2 years ago
Best ResponseYou've already chosen the best response.0Example: L: "fooo", "barr", "wing", "ding", "wing" S: "lingmindraboofooowingdingbarrwingmonkeypoundcake" fooowingdingbarrwing Answer: 13 L: "mon", "key" S: "monkey monkey Answer: 0 L: "a", "b", "c", "d", "e" S: "abcdfecdba" ecdba Answer: 5

g152xx
 2 years ago
Best ResponseYou've already chosen the best response.0@mayankdevnani thanks but doenst have the code on the page. Found here something like mine : http://www.careercup.com/question?id=12332722

TuringTest
 2 years ago
Best ResponseYou've already chosen the best response.0Please post this in the computer science section. Thanks.
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.