algorithm learning
作者 | 兰军 |
---|---|
author | Lanujun |
学习算法和数据结构。
Learning data structure and algorithm
- algorithm
- hanoi(汉诺塔算法)
- Linear Search(线性查找)
Time complexity: O(n)
Code - Binary Search(折半查找)
Halve the number of candidates in each epoch
每次查找候选区减少一半
Time complexity: O(logn)
Code - Sort(排序)