数据结构与算法 学习摘要

来源:互联网 发布:搞怪照片软件下载 编辑:程序博客网 时间:2024/05/21 22:54

时间复杂度比较

O(1) < O(logn) < O(n) < O(nlogn) < O(n^2) < O(n^3)

线性表

栈(stack) : 后进先出
队列(queue) : 先进先出
链表(linkedlist) : 单链表, 双链表
https://github.com/cxMax/LeetCode/tree/master/datastructs_and_algorithm/Linear

邻接矩阵无向图\有向图 :
邻接表无向图\有向图 :
https://github.com/cxMax/LeetCode/tree/master/datastructs_and_algorithm/grafh

二叉堆 :
左倾堆 :
斜堆 :
二项堆 :
斐波那契堆 :
https://github.com/cxMax/LeetCode/tree/master/datastructs_and_algorithm/Heap

二叉树(binary search tree) :
AVL树(balance binary search tree) :
红黑树(RBTree) :
伸展树(SplayTree) :
赫夫曼树(HuffmanTree) :
https://github.com/cxMax/LeetCode/tree/master/datastructs_and_algorithm/Tree

排序

  • 比较排序 :
    • 冒泡排序
    • 插入排序
    • 快速排序
    • 选择排序
    • 希尔排序
    • 归并排序
  • 非比较排序 :
    • 记数排序
    • 桶排序
    • 基数排序

https://github.com/cxMax/LeetCode/tree/master/sortArray

reference

http://www.cnblogs.com/skywang12345/category/508186.html