Skip to content

alyssaq/Cplusplus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Playground

My collection of random C++ algorithms and testbed.

To compile:

g++ sorts.cpp

To run:

./a.out

Common Sorts

Merge sort:

  • Advantages: suitable for linked list, suitable for external sort.
  • Disadvantages: need extra buffer holding the merged data.

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.

About

C++ playground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages