LeetCode Summary of Data Structure & Algorithms


1. 常见数据结构

线性:
数组:Merge Sorted Array
链表:Merge k Sorted Lists,Partition List
队列,
堆栈,
块状数组(数组+链表),
hash表,
双端队列,
位图(bitmap)

树:
   二叉树: Minimum Depth of Binary Tree, Path Sum II, Inorder Travel
堆(大顶堆、小顶堆),
trie树(字母树or字典树),
后缀树,
后缀树组,
二叉排序/查找树,
B+/B-,
AVL树,
Treap,
红黑树,
splay树,
线段树,
树状数组

图:图

其它:并查集

2、常见算法

(1) 基本思想:枚举,
递归: Flatten Binary Tree to Linked List,Generate Parentheses,Letter Combinations of a Phone Number
分治,
模拟&贪心: Gray Code,Insert Interval,Jump Game II, Multiply Strings, Next Permutation, Palindrome Number,Pascal's Triangle II
贪心,动态规划,剪枝,回溯
二分查找:Median of Two Sorted Arrays,Search in Rotated Sorted Array

(2) 图算法:深度优先遍历与广度优先遍历, 最短路径,最小生成树,拓扑排序

(3) 字符串算法:
字符串查找: Implement strStr,Length Of Last Word,Longest Common Prefix,
Longest Palindromic Substring, Longest Non-Repeating SubString
双指针: Minimum Window Substring
hash算法,KMP算法

(4) 排序算法:冒泡,插入,选择,快排,归并排序,堆排序,
桶排序: First Missing Positive

(5) 动态规划:Distinct Subsequences,Edit Distance, Interleaving String, Jump Game,Largest Rectangle in Histogram
背包问题,最长公共子序列,最优二分检索树

(6) 数论问题:素数问题,整数问题,进制转换,同余模运算,
进制转换:Integer To Roman
乘除法:Divide Two Integers

(7) 排列组合:排列和组合算法

(8) 其它:LCA与RMQ问题

(9) 水箱问题:Trapping Rain Water,Container With Most Water,

 

3. 常见设计题
(1)海量数据处理


你可能感兴趣的:(LeetCode,数据结构,算法)