O'Reilly logo
  • You Wang thinks this is interesting:

A good way to structure many computer programs is to store the key information you currently know in some data structure and then have each iteration of the main loop take a step towards your destination by making a simple change to this data.


Cover of How to Think About Algorithms


design a data structure that's a minimal version of final output, and design the process so that each loop increases the structure towards final output.