Thursday, May 21, 2009

Steps to think about an algorithm problem

I am reading the book How to Think About Algorithms, and find this book very interesting to read. Compare to traditional algorithm books which mainly explain how  the algorithm work, this book takes a more “head first” approach, try to explain how you should think about algorithm. The style is close to Head First Design Pattern, which of course focus more on design pattern.

The basic steps are:

  1. Specifications
  2. Basic Steps
  3. Measure of Progress
  4. The Loop Invariant
  5. Main Steps
  6. Make Progress
  7. Maintain Loop Invariant
  8. Establishing the Loop Invariant
  9. Exit Condition
  10. Ending
  11. Termination and Running Time
  12. Special Cases
  13. Coding and Implementation Details

0 comments: