I have a spring boot application, that simply does, takes a set of characters and lists out possible english words. Now, as everyone knows , its fairly easy, build a trie data-structure to load up a dictionary.
Now, the problem is let's say 170,000 words in english dictionary, need to be in-memory, how do I achieve that ?
I have mostly used in-memory databases like H2 with spring boot, but I am not sure how would I store a trie in database.
Other caches (like redis) store key-value data structure, since trie is not a key-value pair, I am not sure how to store it.
Any suggestions would be welcome.