On-screen text
LeetCode
for beginners!
Truth about Hash Maps!
(save this for later!) 👁️👁️
(from a software engineer)
swipe
@that_swe_intern
All content is for educational purposes
Google
Microsoft
amazon
So, you want a $200k+ software job from these guys ^
But you don't know how
Hash Maps actually work.
Here's my full 4 year degree
In just 3 slides!
swipe
@that_swe_intern
All content is for educational purposes
1) Grocery Analogy
Let's say you're looking
for some Item A...
You're smart, so instead of searching
the entire grocery store...
...you just find the correct aisle to search.
This is the main idea
Behind Hash Maps!
Simple, right? Let's go on.
swipe
@that_swe_intern
All content is for educational purposes
2) "Scary" Code
This is a technical diagram
of a Hash Map...
0
1
2
3
We have 4 "buckets"...
...and values 0 through 11!
Can you quickly tell if the value 7
is in our hashmap?
GREAT
WORK
swipe
@that_swe_intern
All content is for educational purposes
3) Getting Values
We just have to figure out what
"aisle" (bucket) the value 7 is in...
IMPORTANT: for any value x, a
hash function h(x) tells us its bucket!
0
1
2
3
(Here, h(x) = x % 4, so h(7) = 3)!
To find 7, we search
ONLY bucket 3!
GREAT
WORK
swipe
@that_swe_intern
All content is for educational purposes
Congrats!
You know Hash Maps better than 90% of CS majors!
You're on your way to a job with:
1. Great Pay
2. Work-Life Balance
3. Interesting Problems
Keep it up!
Follow to commit to your
goal of breaking into tech!
@that_swe_intern
All content is for educational purposes