Make sure you really understand the problem. What is the input? The output? What’s the precise relationship between the two? Try to represent the problem instances as familiar structures, such as sequences or graphs. A direct, brute-force solution can sometimes help clarify exactly what the problem is.
- Chapter 4: Induction and Recursion … and Reduction
- from Python Algorithms: Mastering Basic Algorithms in the Python Language, Second Edition
- Publisher: Apress
- Released: September 2015
input, output, relationship between them
Share this highlighthttp://www.safaribooksonline.com/a/python-algorithms-mastering/18539406/