Tài liệu Thuật toán Algorithms (Phần 16) pdf
... (together with Quicksort) are typical of im- plementations of divide-and-conquer algorithms. We’ll see several algorithms with similar structure in later chapters, so it’s worthwhile to take a ... recursion comes into play. Many algorithms are quite simply expressed in a recursive formulation. In modern programming environments, recursive programs implementing such algorithms can be qu...
Ngày tải lên: 21/01/2014, 17:20
... the programs to handle more complicated records and keys, but this won’t fundamentally change the algorithms. For example, info could be made into a pointer to an arbitrarily complicated record ... or largest key value to simplify 174 CHAF’TER 14 the coding of the inner loop of various sorting algorithms. This method takes about N steps for an unsuccessful search (every record must be exam...
Ngày tải lên: 21/01/2014, 17:20
... memory for the links, while Quicksort sorts with only a little extra memory. The running times of algorithms on binary search trees are quite depen- dent on the shapes of the trees. In the best ... However, binary trees also provide a good example of a recurrent theme in the study of searching algorithms: the delete function is often quite cumbersome to implement. To delete a node from a ....
Ngày tải lên: 21/01/2014, 17:20
Tài liệu Thuật toán Algorithms (Phần 23) pdf
... ‘Andrews’, but after ‘Aitken”‘) followed by sequential search (“ ‘Algonquin’ . . . ‘Algren’ . . . No, Algorithms isn’t listed!“). Of course computers are likely to be somewhat better than humans at
Ngày tải lên: 21/01/2014, 17:20
Tài liệu Thuật toán Algorithms (Phần 25) pdf
... problem can be characterized as a searching prob- lem with the pattern as the key, but the searching algorithms that we have studied do not apply directly because the pattern can be long and because it ... unknown way. It is an interesting problem to study because several very different (and surprising) algorithms have only recently been discovered which not only provide a spectrum of use...
Ngày tải lên: 21/01/2014, 17:20