Structs & Enums in Rust: interview exercises
Structs & Enums in Rust: 7 test-checked interview exercises (Methods on a struct, Match on enum variants), each beside a worked example, with tests as you go. Free.
- Methods on a struct
- Match on enum variants
- Invert keys and values
- Reach through nested Options
- Totals by status
- Flatten a tree with depth
- A stack machine of commands
Each exercise pairs a worked example with a twin problem to solve in a real editor; the tests run the moment you do. Progress is saved in your browser, and in your account if you sign in.