Consider all suffixes of given string and insert them into the Suffix Trie using recursive function insertSuffix ( ) in SuffixTrieNode class
for ( int i = 0 ; i < s . length ( ) ; i ++ ) root -> insertSuffix ( s . substr ( i ) ) ; }