Repository files navigation
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
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
LeetCode 976
LeetCode 1779
iterators
❓ The performance and memory usage in this implemention is higher than the ones using for loops...why?
LeetCode 1822
LeetCode 1502
LeetCode 202
LeetCode 1790
match (somthing similar to switch 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");
You can’t perform that action at this time.