flâneur

What is a suffix tree?

educative.io · 135 words · saved by 1 readers

Contributor: Rukhshan Haroon

A suffix tree is a tree data structure typically used to store a list of strings. It is also referred to as the compressed version of a trie, as, unlike a trie, each unique suffix in the list is compressed together and represented by a single node or branch in a suffix tree. There are many ways to construct a suffix tree, but the semantics that is shared by most if not all types of suffix trees are as follows: A special character is appended to each sub-string. Each leaf node contains the starting position or index of the suffix it represents. The alphabets of any suffix are compressed…

saved by

related reading