Thanks for your comment! After reading it, I believe I was misunderstood because I did not explain it correctly.
I agree with you when you said that the trie isn't an O(1) as a hash-table... But the trie can perform better in some complex problems, such as a search engine or autocomplete feature comparing with the hash table structure. Because we have to consider an imperfect associative array and it's almost impossible to create a uniform random distribution to avoid conflicts that lead to handling collisions by separate chaining or linear/double/Quadratic Proibing, the time to calculate the hash table, memory accesses...
I did't understand the problem in your project, but if you want, you can describe more and I can try to help you :)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.