Problem 7
conditions
Given a character text string, there may be substring patterns in the text.
Example
Text: "This is a test string to search patterns in", Patterns: "is a", "sea", "string", "ring".
assignment
Write a function (or describe the algorithm) that finds multiple patterns in such a text.
discussion
What is the complexity of your solution? Can you describe an algorithm that visits each byte in the text just once? The speed of the solution is important.