Back to problems

Serialize and Deserialize Dictionary Trie

Algorithm · Snowflake · Medium

Encode and Decode a Dictionary Trie Implement a codec that can store and restore a trie containing dictionary entries. You receive an array of distinct lowercase words. Construct a trie for those entries, then provide the following operations: serialize(words) must turn the trie into a string representation. deserialize(data) must rebuild the trie from that representation and return every stored word in lexicographical order. You may choose the encoding scheme freely,…

Checking your access…