You have 4 strings. You can permute each string in anyway you want and then you are going to construct a trie from these 4 strings. What is the minimum possible number of nodes in this trie?"
You have 4 strings. You can permute each string in anyway you want and then you are going to construct a trie from these 4 strings. What is the minimum possible number of nodes in this trie?"
hello @Kash-Moulik-3715574511847721
find number of common characters in all 4 strings , and then use 1 node for them.
and for remaining characters it is mandatory to use nodes.
so answer should be - > intersection of all four strings + summattion of remaining characters.