Friday, March 6, 2009

Merge Sort

 First divide the list into the smallest unit (1 element), then compare each element with the adjacent list to sort and merge the two adjacent lists. Finally all the elements are sorted and merged.


Efficiency
  • Worst case performance     O(n log n)
  • Best case performance   O(n log n)
  • Average case performance     O(n log n)

No comments:

Post a Comment

Learn Programming online

Started Two months Online Programming Classes for XI, XII (all boards), B.Sc.(CS/IT), BCA, M.Sc.(CS/IT), MCA. Programming Languages 1. C 2. ...