0% found this document useful (0 votes)
23 views30 pages

_Steps_of_Highly_Effective_Problem_Solving_and_Technical_Intrview

Steps of highly effective problem solving

Uploaded by

ktesfaneh0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views30 pages

_Steps_of_Highly_Effective_Problem_Solving_and_Technical_Intrview

Steps of highly effective problem solving

Uploaded by

ktesfaneh0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

The 7 Steps of Highly Effective

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.

If something is written there, there must be a reason


for that.

5
2. Solve the problem
manually

6
‘Nothing can be automated that cannot be done
manually!’

Solving a problem programmatically means telling the


computer how to solve it via a language it can
understand.

7
Computers can do things at scale, a lot faster than
people can.

If you don't know how to solve the problem for small


input, how can you tell a computer to solve it at scale?

8
Sometimes, solving it by hand reveals some
patterns that are key to the programmatic
solution.

Observe yourself, and understand how you do


it by hand to automize.

9
3. Come up with a solution
idea on the paper

10
What comes after solving it by hand?

The big picture and patterns are not always


visible at first glance.

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

Skipping time and space complexity checks.

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.

At the same time, it is better to fall in love with


them after getting to know them well.

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.

Ask yourself, how can I break this idea? Can you


come up with an input that breaks it? Try to
target it logically, what can be an edge case for
it? 18
TIP
A tip that can be useful for coming up with
edge cases is going over your proposed
solution and looking for assumptions you
might have made.
Time is gold, especially in the interviews.

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.

Divide your code into blocks and using helper


functions whenever you can.

21
1. CHOOSE THE BEST LANGUAGE FIT

2. VARIABLE NAMING

3. USE HELPER FUNCTIONS

4. EXPLAIN CODE BLOCKS AFTER FINISHING

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.

Testing is not just coming up with obvious edge cases


like null nodes, empty arrays, or zero values. It is also
not trying some random cases.
24
Inside View of A2SV Technical
Interview

A2SV <> Technical Interview Template : Link

2
23
Each test case you try should have a motivation.

At this stage, do not just think about your algorithm.


Imagine the code is written by a 3rd party. Your job is
to make sure your tests save the codebase from
merging a buggy or inefficient code.

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.

Consider better variable naming, adding some


comments, and possibly modularizing further. This
step can be optional, depending on how much time
you have left.

27
“Practice doesn't make perfect, perfect practice
makes perfect”
Vince Lombardi

You might also like