- 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
- it is cool that there's
- variables and constants:
let
,mut
,const
- if-else statements
while
loop
- basic data types (integers were mostly used in today's questions)
- LeetCode 1491
- learnt about Vector
- revised about pointers
- LeetCode 191
- Rust has a method
count_ones()
inu32
which makes the solution a one-liner lol
- Rust has a method
- LeetCode 1281
- should've used iterator
- 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?
- iterators
- LeetCode 1822
- LeetCode 1502
- LeetCode 202
- LeetCode 1790
match
(somthing similar toswitch
in C)- tuples
- 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");