How about a regex one-liner?
And you can simplify the insert operation:
Sharing my trie solution 24ms (99%) @ 2017-08-04 20:10:47
The explanation is available.
@dilyar I make the exact solution!
No one has replied
Just a shorter/simpler regex ending:
sizeof(map<char, node>) is 48 in a class object, which can cause MLE if Trie is too big.
Disabled Categories are greyed out
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.