Drop hier links of afbeeldingen om ze aan de editor toe te voegen.

Previously, we introduced the suffix array. In this problem, we will let you use the suffix array to solve the Multiple Pattern Matching Problem

Assignment

Implement the multiple_pattern_matching method which takes a string and a list of patterns.

The function should return the set of indices where any of the patterns occurs in the string.

Example

>>> multiple_pattern_matching('ACACTTTCGAAGGGGTACCT', ['C', 'G', 'G', 'C'])
{1, 3, 7, 8, 11, 12, 13, 14, 17, 18}