Difference between revisions of "TADM2E 4.41"

From Algorithm Wiki
Jump to: navigation, search
(Blanked the page)
(Undo revision 1093 by FuckMatt (talk))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
Merge sort:
 +
    *Advantages: suitable for linked list, suitable for external sort.
 +
    *Disadvantages: need extra buffer holding the merged data (but for linked-list)
  
 +
Insertion/Selection sort:
 +
    *Advantages: easy to implement.
 +
    *Disadvantages: too slow and become impractical when data is huge.
 +
 +
Heap sort:
 +
    *Advantages: don't need recursion. Suitable for large data.
 +
    *Disadvantages: usually slower than merge sort and quick sort.
 +
 +
Quick sort:
 +
    *Advantages: practical fastest.
 +
    *Disadvantages: recursive, worst case too slow.

Latest revision as of 00:45, 1 August 2020

Merge sort:

   *Advantages: suitable for linked list, suitable for external sort.
   *Disadvantages: need extra buffer holding the merged data (but for linked-list)

Insertion/Selection sort:

   *Advantages: easy to implement.
   *Disadvantages: too slow and become impractical when data is huge.

Heap sort:

   *Advantages: don't need recursion. Suitable for large data.
   *Disadvantages: usually slower than merge sort and quick sort.

Quick sort:

   *Advantages: practical fastest.
   *Disadvantages: recursive, worst case too slow.