Let's say that I got a suffix tree ST(T) and a pattern S1 * S2 ... * Sk, whereas * represents any string out of the same alphabet as the strings S1,...,Sk.
How do I find the pattern using the indexes of the leaf nodes?
My idea for 2 strings S1 and S2 would be to put every occurence of S1 and S2 into integer lists a1 and a2 and check if any integer in a2 is greater or equal than any integer in a1 + s1.length.
Am I on the right track? And is it a similar method for k strings?