/CppCommonAlgorithm

Basic implementation of most commonly seen algorithms.

Primary LanguageC++MIT LicenseMIT

Summary

Sorting

1. Insertion Sort

Insertion Sort (Stable)

Shell Sort (Unstable)

2. Selection Sort

Selection Sort (Unstable)

Heap Sort (Unstable)

3. Comparison Sort

Bubble Sort (Stable)

Quick Sort (Unstable)

4. Merge Sort

Merge Sort (Stable)

5. Non-comparative Sort

Counting Sort (Stable)

Bucket Sort (TODO, Stable)

Radix Sort (TODO, Stable)

Searching

Linear Search

Binary Search

Reference

  1. Thomas H. Cormen. Algorithms Unlocked, 2013
  2. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. Introduction to Algorithms, 3rd, 2009
  3. 俞勇. 数据结构: **与实现, 1st, 2009