How to Solve a Difficult Problem
Good problems teach you how to think.
When you face a difficult problem, you have to take a systematic approach that consists of essential steps in problem-solving. I propose the following procedure to crack a difficult problem:
- Determine how to solve the problem (e.g. dynamic programming) and come up with an appropriate data structure (e.g. 2D array) on which your algorithm will run.
- Solve a small example using the data structure by hand.
- Then make a flowchart based on how you solved the problem in the previous step.
- Offset corner cases.