advanced data structures and implementation eed deed ed ed eed ed eed deed figure lefttrie representing the suffixes for deed{ddeededeed}rightcompressed trie that collapses single-node branches trie in figure is exactly one less than the number of internal branching nodes in the original trie in figure and of course writing all the suffixes in the leaves could take quadratic space so if the original used quadratic spaceso does the compressed trie fortunatelywe can get by with linear space as follows in the leaveswe use the index where the suffix begins (as in the suffix array in the internal nodeswe store the number of common characters matched from the root until the internal nodethis number represents the letter depth figure shows how the compressed trie is stored for the suffixes of banana the leaves are simply the indices of the starting points for each suffix the internal node with letter depth of is representing the common string "ain all nodes that are below it the internal na na banana banana na ana anana na na nana figure compressed trie representing the suffixes for banana{aanaananabanananananaleftthe explicit representationrightthe implicit representation that stores only one integer (plus branchesper node