1

enter image description here

This is a visual graph of a suffix tree for the input text "mississippi". In this example, my keyword that I'm searching for is "si". I think I understand how to get the first index of "si"

  • start at root node #1
  • first edge is "s", so we travel down to node #2
  • second edge of node #2 is "i", so we retrieve node #7, and this node stores the index into the text.

But now for the second occurrence of "si"... do I just continue searching down the subtree #7 for the next occurrence? Doesn't really make sense to me.

Or, does the tree have to be assembled in a different way in order to support multiple indexes?

user85116
  • 4,422
  • 7
  • 35
  • 33

0 Answers0