เส้นทางการเรียนรู้

ฝึก Rust

แบบฝึกหัดสั้น ๆ 10 ข้อ: FizzBuzz, Fibonacci, จำนวนเฉพาะ, สตริง, binary search และบัญชีธนาคาร

บทเรียน 10 บท · โจทย์ 16 ข้อ

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