Problem solving techniques


Most examples are too small or are speca
cases, Detbug your example. ls there any
way it's a special case? Is it big enough?

-- 2 Example

wchart walks you through

Practice

ow to solve a problem. Use this in your p

Now that you have an optimal so.
through your approach in detai
you understand each detail belore .
coding

Get a brute-force solution as so as
possible. Don't worry about developing
an efficient algorithm yet. State a naive
algorithm and its runtime, then optimize

Listen

A Problem-Solving Flowchart

tos

1, Conceptual test. Walk through your code

Test in this order:

optimization or try some of these ideas:

Optimize

from there. Don't code yet though!

BUD Optimization

Pay very close attention to any
information in the problem description.
You probably need it all for an optimal
algorithm.

How did you solve it?

ses, It's much faster than a big

Implement

Make a time v

Issues

need all the informatio in a problem.
Solve tmanually on an example, then
reverse engineer yourthought proce

test case and just as effective.
s Special cases and edge case

4. Small test

3. Hot spots, like arithmetic and null nodes.

like you wouid for a detailed code review.
2. Unusual or non-standard code.

Keep talking! Your interviewer wants to
hear how you approach the problem.

beginning and refactor to dean up
anything that isn't beautiful.

Your goal is to write b
Modularize your code from the

Look for any unused info. You usu

Walk through your brute force with BUD

And when you find bugs, fix them carefully

tables are especially useñull
s Walk Through

she ncorectly and then think about
why the algorithm fails. an you fix those

No comments:

Post a Comment

Featured Post

c:\Users\venkpi\Downloads\me.html

"http://vedicastrology-prognosis.blogspot.com/" "https://gre-vocabulary-list.blogspot.com/" "https://sitaramp...

Popular Posts