Question: Q2. A tandem repeat of a base string b within a string s is a substring ofs consisting of at least one consecutive copy of

 Q2. A tandem repeat of a base string b within a

Q2. A tandem repeat of a base string b within a string s is a substring ofs consisting of at least one consecutive copy of the base string b. Given b and s, design an algorithm to find a tandem repeat of b within s of maximum length. For example, if s is "abcabcababcaba" and b is "abcab", then "abcababcab" is the tandem substring of maximum length (2 copies). Your answer will be graded on correctness, efficiency, clarity Let M denote the length of b and let N denote the length of s. For full points, your algorithm should take time proportional to MN. [5]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!