Why I should not use merge sort when the data is almost sort

Why I should not use merge sort when the data is almost sorted? and why I should not use quick sort when stability is required?

Solution

Why I should not use merge sort when the data is almost sorted ?

*  I should not use merge sort when the data is almost sorted. Because merge sort algorithm will take more lienear time in its typical implementation.

why I should not use quick sort when stability is required ?

* I should not use quick sort when stability is required. Because quick sort is not a stable sorting algorithm in its typical implementation.

Why I should not use merge sort when the data is almost sorted? and why I should not use quick sort when stability is required?SolutionWhy I should not use merg

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site