The Algorithm Design Manual

最新书摘:
  • [已注销]
    2013-06-17
    If you are determined to implement your own quicksort, use the following heuristics, which make a big difference in practice:* Use ranomization* Median of three* Leave small subarrays for insertion sort* Do the smaller partition first
  • [已注销]
    2013-06-17
    When you have morethan 100 items to sort, it is important to use an O(nlgn)-time algorithm like heapsort, quicksort, or mergesort.... Once you get past (say) 5,000,000 items, it is important to start thinking about external-memory sorting algorithms that minimize disk access.
  • [已注销]
    2013-06-17
    Typical computer science students study the basic sorting algorithms at least three times before they graduate: first in introductory programming, then in data structures, and finally in their algorithms course.