Learning path

Rust practice

Ten short exercises: FizzBuzz, Fibonacci, primes, strings, binary search and a bank account.

10 lessons · 16 challenges

  1. Lesson 1 challenge FizzBuzz Solve the classic FizzBuzz problem with match on a tuple.
  2. Lesson 2 challenges Fibonacci Sequence Generate Fibonacci numbers with a loop and a vector.
  3. Lesson 2 challenges Prime Numbers Check whether a number is prime and list the primes up to 30.
  4. Lesson 1 challenge Reverse a String Reverse the characters of a string and the words of a sentence.
  5. Lesson 2 challenges Palindrome Check Test whether text reads the same forwards and backwards.
  6. Lesson 2 challenges Word Frequency Counter Count how often each word appears with a HashMap.
  7. Lesson 1 challenge Temperature Converter Convert between Celsius and Fahrenheit with an enum.
  8. Lesson 2 challenges Binary Search Find a value in a sorted slice by halving the search range.
  9. Lesson 1 challenge Bank Account with Result Model deposits and withdrawals that can fail with your own error type.
  10. Lesson 2 challenges Sort Structs: Student Ranking Sort a vector of structs by score and name, then compute the average.