Professional Documents
Culture Documents
ES85 W6.Ass1. Alajid K1
ES85 W6.Ass1. Alajid K1
2 4 1 3 5 7 9 6 8
2 1 3 4 7 6 8 9
1 2 4 6 7 9
1 2 3 4 5 6 7 8 9
CODE
ADVANTAGES AND
DISADVANTAGES OF
QUICKSORT
Advantage
•Its inner loop is relatively short.
•After a thorough mathematical investigation of this algorithm, you can make a
reasonably specific statement about performance issues.
Disadvantage
•It is a recursive process. The implementation is quite tricky, mainly if recursion is
not provided.
• It is fragile in the sense that a slight error in implementation can go unreported and
cause it to function poorly.