Transcription of The Running Time of Programs - Stanford University
{{id}} {{{paragraph}}}
CHAPTER3FF FFThe Running Timeof ProgramsIn Chapter 2, we saw two radically different algorithms for sorting: selection sortand merge sort. There are, in fact, scores of algorithms for sorting. This situationis typical: every problem that can be solved at all can be solved by more than , then, should we choose an algorithm to solve a given problem? As ageneral rule, we should always pick an algorithm that is easyto understand, im-plement, and document. When performance is important, as itoften is, we alsoneed to choose an algorithm that runs quickly and uses the available computingresources efficiently.
SEC. 3.3 MEASURING RUNNING TIME 91 amounts of data tend to be more complex to write and understand than are the relatively inefficient algorithms. The understandability, or simplicity, of an algorithm is somewhat subjective.
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}