text: Starting the cut from ith character taking temporary node pointer for checking whether the substring [ i , j ) is present in trie of not
code: TrieNode * temp = root ; for ( int j = i + 1 ; j <= n1 ; j ++ ) { if ( temp -> child [ S1 [ j - 1 ] - ' a ' ] == NULL )