Solving algorithms:
beyond cramming for
job interviews
1
@ninoid_
Slide 2
Slide 2 text
Have you ever used this site?
2
@ninoid_
Slide 3
Slide 3 text
Or this one?
3
@ninoid_
Slide 4
Slide 4 text
Or maybe this one?
4
@ninoid_
Slide 5
Slide 5 text
5
Slide 6
Slide 6 text
How employers see the solving CS problems:
6
@ninoid_
Slide 7
Slide 7 text
7
@ninoid_
Slide 8
Slide 8 text
8
@ninoid_
Slide 9
Slide 9 text
9
@ninoid_
Nina Torgunakova
Frontend Engineer
Slide 10
Slide 10 text
Job interviews
10
@ninoid_
Other benefits
Slide 11
Slide 11 text
Some myths and facts about
algorithmic problems
11
@ninoid_
Slide 12
Slide 12 text
Problems are boring.
12
Myth №1:
@ninoid_
Slide 13
Slide 13 text
13
@ninoid_
Myth № 1: Problems are boring
Slide 14
Slide 14 text
Problems could be fun
and tricky!
14
Fact №1:
@ninoid_
Slide 15
Slide 15 text
15
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 16
Slide 16 text
Can you presume the probability that
the last person will get his own sit?
There are 100 seats and 100 passengers.
16
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 17
Slide 17 text
0,5
Either you meet
or either you
don't meet
17
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 18
Slide 18 text
18
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 19
Slide 19 text
19
What is the minimum amount of cuts
needed to divide a circle into 3 equal
slices?
Answer: 3
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 20
Slide 20 text
20
But what if we need to divide a circle
into 99 equal slices?
You can solve it programmatically in
2 lines!
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 21
Slide 21 text
21
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 22
Slide 22 text
?
Can you presume the minimum total cost to
move three chips into one column?
22
@ninoid_
Fact №1: Problems could be fun and tricky
Slide 23
Slide 23 text
?
23
@ninoid_
Answer: 1
Fact №1: Problems could be fun and tricky
Slide 24
Slide 24 text
All problems are complex.
24
Myth №2:
@ninoid_
Slide 25
Slide 25 text
25
@ninoid_
Myth №2: All problems are complex
Slide 26
Slide 26 text
There are many tasks for all
levels of preparation.
26
Fact №2:
@ninoid_
Slide 27
Slide 27 text
27
@ninoid_
Fact №2: Many tasks for each level of preparation
Slide 28
Slide 28 text
28
@ninoid_
Fact №2: Many tasks for each level of preparation
Slide 29
Slide 29 text
29
@ninoid_
Fact №2: Many tasks for each level of preparation
Slide 30
Slide 30 text
30
@ninoid_
Fact №2: Many tasks for each level of preparation
Slide 31
Slide 31 text
Problems are time-consuming.
31
Myth №3:
@ninoid_
Slide 32
Slide 32 text
When you decide to stay in the office
for ten minutes to sort out a bug
32
@ninoid_
Myth №3: Problems are time-consuming
Slide 33
Slide 33 text
You can limit your solving time
to prevent wastes.
33
Fact №3:
@ninoid_
Slide 34
Slide 34 text
How I see myself solving a problem
for two hours without Google
34
@ninoid_
Fact №3: You can limit your time
Slide 35
Slide 35 text
It is all about the marathon.
Not the sprint.
35
@ninoid_
Fact №3: You can limit your time
Slide 36
Slide 36 text
Problems are not connected with
real work and needed only for job
interviews.
36
Myth №4:
@ninoid_
Slide 37
Slide 37 text
37
@ninoid_
Myth №4: Problems are not connected with real work
Slide 38
Slide 38 text
Solving problems can help you
not only with tech interviews.
38
Fact №4:
@ninoid_
Slide 39
Slide 39 text
39
@ninoid_
Fact №4: It is useful not only for job interviews
Slide 40
Slide 40 text
What will happen in one year?
Imagine that from today you
start to solve algorithmic
problems wisely.
40
@ninoid_
Fact №4: It is useful not only for job interviews
Slide 41
Slide 41 text
// TODO: DELETE THIS SLIDE
41
@ninoid_
Slide 42
Slide 42 text
You will write code faster.
42
Result №1:
@ninoid_
Slide 43
Slide 43 text
43
@ninoid_
What I can write now in 5 minutes:
Result №1: You will write code faster
Slide 44
Slide 44 text
44
@ninoid_
What I wrote in 5 minutes a year ago:
Result №1: You will write code faster
Slide 45
Slide 45 text
Fewer bugs in your code.
45
Result №2:
@ninoid_
Slide 46
Slide 46 text
46
@ninoid_
Result №2: Fewer bugs in your code.
Slide 47
Slide 47 text
You will explain your decisions
better.
47
Result №3:
@ninoid_
Slide 48
Slide 48 text
48
@ninoid_
Use the discussion sections to practice explaining
Result №3: You will explain your decisions better.
Slide 49
Slide 49 text
You will not be afraid of complex
work tasks.
49
Result №4:
@ninoid_
Slide 50
Slide 50 text
50
Auto-building network maps for data centers
@ninoid_
Result №4: You will not be afraid of complex tasks.
Slide 51
Slide 51 text
You will expand your horizons.
Not only in the programming
field!
51
Result №5:
@ninoid_
Slide 52
Slide 52 text
52
@ninoid_
Result №5: You will expand your horizons.
Slide 53
Slide 53 text
What about lifehacks?
53
@ninoid_
Slide 54
Slide 54 text
Keep track of your energy level
during the day.
54
Tip №1:
@ninoid_
Slide 55
Slide 55 text
Always consider constraints and
try to test every action.
55
Tip №2:
@ninoid_
Slide 56
Slide 56 text
56
Tip №2: Always consider constraints
1
2 3
4 5
Task: Traverse the tree
with N amount of nodes
What if the amount of nodes
equals 0?
Could it be?
@ninoid_
Slide 57
Slide 57 text
Try to explain your solutions
and learn from others.
57
Tip №3:
@ninoid_
Slide 58
Slide 58 text
58
@ninoid_
Tip №3: Try to learn from others
Slide 59
Slide 59 text
"Don't compare your chapter
1 with someone else's
chapter 20."
59
@ninoid_
Tip №3: Try to learn from others
Slide 60
Slide 60 text
Track your progress.
60
Tip №4:
@ninoid_
Slide 61
Slide 61 text
61
Tip №4: Track your progress
@ninoid_
Slide 62
Slide 62 text
62
@ninoid_
Tip №4: Track your progress
Slide 63
Slide 63 text
63
@ninoid_
Tip №4: Track your progress
Slide 64
Slide 64 text
1. Leetcode.com.
2. See you tomorrow!
64
@ninoid_
Consistency is a key!