[go: up one dir, main page]

Improve Trie Common substring searcher

Trie has a static FindCommonSubString which creates a new Trie instance and searches for a common substring.

Improve on that by creating a non-static method override which will perform the same operation but without creating a new Trie instance, but operates on existing states instead.

Edit the static method in such a way, that it doesn't create a Trie instance at all and iterates over strings instead - this will improve performance.