ThoughtSpot Interview Question

Trie based string matching question