We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I created a chain of dictionaries instead of creating a chain of nodes. "Chained dictionaries" here, in practice, is a lot like using dictionaries to create a linked list.
I have a root dictionary with a key for letters added to it (potentially all letters). Each key of the root dictionary then has keys of all letters added to it and a key to add up the number of words that can be made from that point down.
If you google making a trie with dictionaries, you'll find things very similar to what I did here. Good luck!
Contacts
You are viewing a single comment's thread. Return to all comments →
Hi there,
I created a chain of dictionaries instead of creating a chain of nodes. "Chained dictionaries" here, in practice, is a lot like using dictionaries to create a linked list.
I have a root dictionary with a key for letters added to it (potentially all letters). Each key of the root dictionary then has keys of all letters added to it and a key to add up the number of words that can be made from that point down.
If you google making a trie with dictionaries, you'll find things very similar to what I did here. Good luck!