Skip to content

hrmck/leetcode-in-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Log

Day 1 (2022/05/02)

  • following LeetCode's Programming Skills I to familiarize myself with Rust
    • did questions 1492 and 1523
  • first time to use Rust! I've learnt about:
    • basic data types (integers were mostly used in today's questions)
      • it is cool that there's arch to determine the integer size according to the machine's architecture
    • variables and constants: let, mut, const
    • if-else statements
    • while loop

Day 2 (2022/05/03)

  • LeetCode 1491
    • learnt about Vector
    • revised about pointers
  • LeetCode 191
    • Rust has a method count_ones() in u32 which makes the solution a one-liner lol
  • LeetCode 1281
    • should've used iterator

Day 3 (2022/05/04)

  • LeetCode 976
  • LeetCode 1779
    • iterators
      • filter
      • map
      • peekable
    • ❓ The performance and memory usage in this implemention is higher than the ones using for loops...why?

Day 4 (2022/05/05)

  • LeetCode 1822
  • LeetCode 1502
  • LeetCode 202
  • LeetCode 1790
    • match (somthing similar to switch in C)
    • tuples

Day 5 (2022/05/06)

  • LeetCode 589 (does not support Rust, switching to Python)
  • LeetCode 496
    • 💩 referencing and dereferencing
    • HashMap
  • LeetCode 1232
    • 💩 division by zero
    • destructing assignment e.g. let (mux a, mux b) = ("foo", "boo");

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published