_Steps_of_Highly_Effective_Problem_Solving_and_Technical_Intrview
_Steps_of_Highly_Effective_Problem_Solving_and_Technical_Intrview
Problem Solving
If we want to perform well in the interviews
with top tech companies, we need to
prepare and play with the best tactics
1
1. Understand the
Problem
2
If you understand something different than
what is asked, the odds are extremely low that
you land on a correct solution.
3
Each sentence of the text reveals something
about the problem. Sometimes it may not be clear
after the first round of reading. In such times,
check the input/output and its explanation.
4
Don't try to go too fast. Don't try to cut to the chase
immediately.
5
2. Solve the problem
manually
6
‘Nothing can be automated that cannot be done
manually!’
7
Computers can do things at scale, a lot faster than
people can.
8
Sometimes, solving it by hand reveals some
patterns that are key to the programmatic
solution.
9
3. Come up with a solution
idea on the paper
10
What comes after solving it by hand?
11
At this step, it is important to check your
algorithm’s time and space complexity, including
the helper functions you use
12
Rookie mistake
13
Finally, flesh out the details of your algorithm.
14
4. Play devil’s advocate against your idea
before falling in love with it
2
15
We love to love our ideas.
16
Therefore, before falling in love, play
devil’s advocate against them.
17
Imagine the person that you like the least( :) )
proposes this idea, and you want to refute it so
badly.
19
5. The implementation, that is
our mission.
20
Do not try to explain everything to the
interviewer. At the same time, inform them
about what is going on after completing each
block of code.
21
1. CHOOSE THE BEST LANGUAGE FIT
2. VARIABLE NAMING
22
6. Comprehensive
test cases
2
23
After implementing the solution, proceed to test with
interesting cases, including edge ones, to make sure
the solution works for different scenarios.
2
23
Each test case you try should have a motivation.
25
7. Simplify and clean up
your code
2
26
Now that we have a working solution and we are
confident in its accuracy and efficiency let’s do some
cleanup and simplifications.
27
“Practice doesn't make perfect, perfect practice
makes perfect”
Vince Lombardi