点击打开链接点击打开链接參考文献: 只是本文准备用超链接的方式连接到对应解答页面。不断更新中
题目 | 算法 | 数据结构 | 注意事项 |
Clone Graph | BFS | 哈希表 | |
Word Ladder | BFS | 哈希表 | |
Word Ladder II | BFS | 哈希表 | |
Surrounded Regions | BFS | 矩阵 | |
Binary Tree Level Order Traversal | BFS|前序遍历 | 队列 | |
Binary Tree Level Order Traversal II | BFS|前序遍历 | 队列 | |
Binary Tree Zigzag Level Order Traversal | BFS|前序遍历 | 队列 | 每一层顺序分别对待 |
Implement strStr() | KMP算法 | N/A | |
Copy List with Random Pointer | N/A | 哈希表 | |
Remove Duplicates from Sorted Array | N/A | 哈希表 | |
Remove Duplicates from Sorted Array II | N/A | 哈希表 | |
Set Matrix Zeroes | N/A | 哈希表 | |
Anagrams | N/A | 哈希表 | |
First Missing Positive | N/A | 哈希表 | |
N/A | 双指针 | ||
Evaluate Reverse Polish Notation | N/A | 堆栈 | |
N/A | 堆栈 | 记录重要位置 | |
Minimum Window Substring | N/A | 堆栈 | |
Simplify Path | N/A | 堆栈 | |
Longest Valid Parentheses | N/A | 堆栈 | |
Valid Parentheses | N/A | 堆栈 | 词法分析 |
Container With Most Water | N/A | 堆栈 | 记录重要位置 |
Best Time to Buy and Sell Stock | N/A | 数组 | |
Best Time to Buy and Sell Stock II | N/A | 数组 | |
Best Time to Buy and Sell Stock III | N/A | 数组 | |
Length of Last Word | N/A | 数组 | |
Search Insert Position | N/A | 数组 | |
Search for a Range | N/A | 数组 | |
Spiral Matrix | N/A | 矩阵 | 简化为子问题 |
Spiral Matrix II | N/A | 矩阵 | 简化为子问题 |
LRU Cache | N/A | 链表 | |
Reorder List | N/A | 链表 | 快慢指针&链表倒序 |
Linked List Cycle | N/A | 链表 | 快慢指针 |
Linked List Cycle II | N/A | 链表 | 快慢指针 |
Reverse Linked List II | N/A | 链表 | |
N/A | 链表 | ||
Remove Duplicates from Sorted List | N/A | 链表 | |
Remove Duplicates from Sorted List II | N/A | 链表 | |
Merge Two Sorted Lists | N/A | 链表 | |
Rotate List | N/A | 链表 | 快慢指针 |
N/A | 链表 | ||
Swap Nodes in Pairs | N/A | 链表 | |
Remove Nth Node From End of List | N/A | 链表 | 快慢指针 |
Text Justification | N/A | 队列 | |
Candy | N/A | N/A | 简化为子问题 |
N/A | N/A | 首尾指针 | |
Plus One | N/A | N/A | 模拟加法运算 |
Valid Number | N/A | N/A | 词法分析 |
Add Binary | N/A | N/A | 模拟加法运算 |
Insert Interval | N/A | N/A | |
Merge Intervals | N/A | N/A | |
N/A | N/A | 模拟乘法运算 | |
N/A | N/A | ||
递归 | N/A | ||
Roman to Integer | N/A | N/A | |
Integer to Roman | N/A | N/A | |
N/A | N/A | ||
Reverse Integer | N/A | N/A | |
ZigZag Conversion | N/A | N/A | |
Add Two Numbers | N/A | N/A | 模拟加法运算 |
N/A | N/A | ||
String to Integer (atoi) | STL函数 | N/A | |
Next Permutation | STL经典算法 | N/A | |
中序遍历 | 二叉树 | ||
二分查找 | N/A | ||
二分查找 | N/A | ||
二分查找 | N/A | ||
Single Number | 位运算 | N/A | |
Single Number II | 位运算 | N/A | |
前序中序遍历 | N/A | ||
Binary Tree Preorder Traversal | 前序遍历 | 二叉树 | |
Flatten Binary Tree to Linked List | 前序遍历 | 二叉树 | |
Interleaving String | 动态规划 | 二叉树 | |
Unique Binary Search Trees | 动态规划 | 二叉树 | |
Word Break | 动态规划 | N/A | |
Word Break II | 动态规划 | N/A | |
动态规划 | N/A | ||
动态规划 | N/A | ||
Triangle | 动态规划 | N/A | |
Distinct Subsequences | 动态规划 | N/A | |
Decode Ways | 动态规划 | N/A | |
Scramble String | 动态规划 | N/A | |
动态规划 | N/A | ||
动态规划 | N/A | ||
Climbing Stairs | 动态规划 | N/A | |
Minimum Path Sum | 动态规划 | N/A | |
Unique Paths | 动态规划 | N/A | |
Unique Paths II | 动态规划 | N/A | |
Jump Game | 动态规划 | N/A | |
Jump Game II | 动态规划 | N/A | |
Maximum Subarray | 动态规划 | N/A | |
Wildcard Matching | 动态规划 | N/A | |
Substring with Concatenation of All Words | 动态规划 | N/A | |
归并排序 | 链表 | ||
Merge Sorted Array | 合并排序 | N/A | |
后序中序遍历 | N/A | ||
Binary Tree Postorder Traversal | 兴许遍历 | 二叉树 | |
Combinations | 回溯 | N/A | |
Permutation Sequence | 回溯 | N/A | |
回溯 | N/A | ||
回溯 | N/A | ||
Permutations | 回溯 | N/A | |
Permutations II | 回溯 | N/A | |
回溯 | N/A | ||
回溯 | N/A | ||
回溯 | N/A | ||
Longest Substring Without Repeating Characters | 回溯 | N/A | |
Max Points on a Line | 循环遍历 | N/A | 排除同样的点 |
循环遍历 | N/A | ||
Longest Palindromic Substring | 循环遍历 | N/A | |
Insertion Sort List | 插入排序 | 链表 | |
Rotate Image | 矢量旋转与平移 | N/A | |
Longest Consecutive Sequence | 类BFS | 哈希表 | |
Search in Rotated Sorted Array | 类二分查找 | N/A | |
Search in Rotated Sorted Array II | 类二分查找 | N/A | 特殊考虑相等数据 |
Sqrt(x) | 类二分查找 | N/A | |
Pow(x, n) | 类二进制 | N/A | |
Divide Two Integers | 类二进制 | N/A | |
Gas Station | 类合并排序 | N/A | |
Merge k Sorted Lists | 类外排序 | N/A | |
Sort Colors | 类高速排序 | N/A | |
Remove Element | 类高速排序 | N/A | |
Search a 2D Matrix | 类杨氏矩阵 | N/A | |
Restore IP Addresses | 背包问题 | N/A | |
Sum Root to Leaf Numbers | 递归 | 二叉树 | |
Binary Tree Maximum Path Sum | 递归 | 二叉树 | |
递归 | 二叉树 | ||
递归 | 二叉树 | ||
Path Sum | 递归 | 二叉树 | |
Path Sum II | 递归 | 二叉树 | |
Maximum Depth of Binary Tree | 递归 | 二叉树 | |
Minimum Depth of Binary Tree | 递归 | 二叉树 | |
Balanced Binary Tree | 递归 | 二叉树 | |
递归 | 二叉树 | ||
递归 | 二叉树 | ||
递归 | 二叉树 | ||
Unique Binary Search Trees II | 递归 | 二叉树 | |
Binary Tree Inorder Traversal | 递归 | 二叉树 | |
Pascal's Triangle | 递归 | N/A | |
Pascal's Triangle II | 递归 | N/A | |
Convert Sorted List to Binary Search Tree | 递归 | N/A | 快慢指针&反中序遍历 |
Convert Sorted Array to Binary Search Tree | 递归 | N/A | 反中序遍历 |
Subsets | 递归 | N/A | |
Subsets II | 递归 | N/A | |
循环 | N/A | ||
Word Search | 递归 | N/A | |
Count and Say | 递归 | N/A | |
Generate Parentheses | 递归 | N/A | |
递归 | N/A | ||
Regular Expression Matching | 递归 | N/A |