return all strings contains given string in suffix tree
-
05-11-2019 - |
Question
Here is my question:
Given a compressed suffix tree of string S and a substring T. I need to return all substrings of S that begins with the substring T sorted by lexicographic order.
My approach: I can traverse the suffix tree and find the edge / node which last letter of T is written on it. The subtree of this edge basically should be all the substrings of S beginning with the string T.
Am I right about this one? And How can I print all this subtree sorted?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange