In some ways implementing Trie requires less proficiency with Rust than even singly-linked stack. A few auxiliary ideas are also discussed, like lazy instantiation and the difference between const and static.
In some ways implementing Trie requires less proficiency with Rust than even singly-linked stack. A few auxiliary ideas are also discussed, like lazy instantiation and the difference between const and static.
Let’s organize some of the exercises into a library with the goal of learning how to build one. Although all the problems in Rust Dust would be candidates for a library distribution, it’s more straightforward to develop them as simple binaries. Except for those problems which I want to reuse elsewhere in the Rust Dust project — these are the ones included in Rust Dust Lib.
A safe, instructive, but rather impractical implementation of a doubly-linked list.
Rust Dust is my notes as I am learning Rust by implementing various common data structures. We start with a singly linked list, which supports pushing onto the head and popping off the head — a stack. It is significantly easier than a doubly linked list because each list node is pointed to by exactly one owner.