Problem Solving

Steps:

  1. Listen
  2. Example
  3. Brute Force
  4. Optimize
  5. Walk Through
  6. Implement
  7. Test

Optimize:

BUD:

  • Bottlenecks
  • Unnecesary work
  • Duplicated work

DIY - Do It Yourself:

When you get a question, try just working through intuitively on a real example. Often bigger example will be easier. Use a nice, big example and intuitively - manually, that is - solve it for the specific example. Then afterwards, think hard about how you solved it. Reverse engineer your own approach.

Simplify and Generalize:

Implement a multi-step approach. First, we simplify or tweak some contraint. Then, we solve this new simplified version of the problem. Finally, once we have an algorithm for the simplified problem, we try to adapt it for the more complex version.

Data Structure Brainstorm:

Hacky approach.. we can simply run through a list of data structures and try to apply each one.

Note: The more problems you do, the more developed your instinct on which data structure to apply will be. You will also develop a more finely tuned instinct as to which of these approaches is the most useful.


This site uses Just the Docs, a documentation theme for Jekyll.