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.

  1. Methods on a struct
  2. Match on enum variants
  3. Invert keys and values
  4. Reach through nested Options
  5. Totals by status
  6. Flatten a tree with depth
  7. 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.

More Rust topics

All Rust exercises ยท Other languages and frameworks