Please enable JavaScript.
Coggle requires JavaScript to display documents.
CTCI - Walking Through a Problem (4 - Optimize (BUD (Optimize and Solve…
CTCI - Walking Through a Problem
1 - Get Problem Unique Information
Write them down
2 - Drawn example
Dont try to solve it in your head
Good example is
Specific (real ints or strings)
Large
Not special case
3 - State a Brute Force
Solve problem in the easy way
Optimize later
4 - Optimize
Hash table
Best conceivable runtime
Do another example
Make time VS Space trade off
BUD
Optimize and Solve technque 1 - Look for BUD
B
oottleneck
U
nnecessary work
D
uplicated Work
5 - Walkthrough
Solidify understanding of the algorithm