Function to insert word into the Trie
TrieNode * getNewTrieNode ( void ) { TrieNode * pNode = new TrieNode ; if ( pNode ) { pNode -> isLeaf = false ; for ( int i = 0 ; i < ALPHABET_SIZE ; i ++ ) pNode -> children [ i ] = NULL ; } return pNode ; } void insert ( TrieNode * root , string word ) { int index ; TrieNode * pCrawl = root ; for ( int level = 0 ; level < word . length ( ) ; level ++ ) {