75.7k views
13 votes
Suppose you have a string matching algorithm that can take in (linear)strings S and T and determine if S is a substring (contiguous) of T. However,you want to use it in the situation where S is a linear string but T is a circularstring, so it has no beginning or ending position. You could break T at eachcharacter and solve the linear matching problem|T|times, but that wouldbe very inefficient. Show how to solve the problem by only one use of thestring matching algorithm.

User Imantha
by
4.1k points

2 Answers

6 votes
i have no clue how this app works
User Jeanetta
by
5.0k points
4 votes

Answer:

no seishsssssssssssssssssssss

User Narendra Maru
by
4.9k points