Skip to content

therise3107/sorting_algoes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sorting_algoes

Merge sort

  • Uses divide and conquer strategy
  • Has the lowest asymptotic complexity of O(nlogn)
  • Has Space complexity of O(n)
  • Divides the array around mid point and then compares the two values and merges recursively.

Quick sort

  • Uses divide and conquer strategy
  • Has the asymptotic complexity of O(nlogn) in best case
  • No additional space complexity, makes changes to the original array
  • Uses the pivot for partitioning of array
  • Three way partitioning is preffered due to closer complexity to almost nlogn.
  • Places left on items less than pivot and on right greater than pivot.

I like both algorithms but merge sort is stable and faster but quick sort has more variations and can be fun to write the algo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published