Question: Input: n e N followed by a string s consisting of characters from the set {A, C, G,T} of length at most n. This is

Input: n e N followed by a string s consisting of characters from the set {A, C, G,T} of length at most n. This is followed by series of "pattern" strings pat, pat2, ..., each of length at most n. o Format: n In & In pati In pat2 In Goal: For each pattern string pati given as input, find every occurence of pat; in s. Output: Print the starting position of every occurence in s separated by a space. If pat; does not exist, print -1. Terminate all output lines with in Remark: The first two lines of input define the main string s. This does not change for the rest of the input. The pattern strings are given as input in separate lines. Process each pattern string as it is received. Stop at EOF. See public test cases for examples
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
