# Basic Algorithms

## Analysis of Time Complexity

## Algorithm Thoughts

### Greedy Algorithms

### Divide-and-Conquer

### Dynamic Programming

### Backtracking

### Enumeration

## Meta Algorithm

### Sorting Algorithms

Sorting algorithms are meta algorithm. Although they are not tested quit often, the core ideas are very useful.

#### O(n^2)

- Insertion Sort
- Selection Sort
- Shell's Sort (aka Diminishing Increment Sort)
- Bubble Sort

#### O(nlogn)

- Quick Sort
- Merge Sort
- Heap Sort

#### O(n)

- Bucket Sort
- Counting Sort
- Radix Sort

### Searching Algorithm

- BFPRT Algorithm
- Search Trees
- Search by Hashing

## Algorithms for String

- 朴素
- KMP
- RK
- BM
- trie

## Other

- Number Theory
- Probability Theory
- Union-find Algorithm
- Matrix Algorithms