Skip to content

My collection of algorithm and data structure solutions.

Notifications You must be signed in to change notification settings

fseeeye/Algorithms-Cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithms-Cpp

My collection of algorithm and data structure solutions.

Content List

Solution List

贪心算法

QID Name Tip
135 Candy (Hard) 分配问题
435 Non-Overlapping Intervals (Medium) 区间问题
455 Assign Cookies (Easy) 分配问题

双指针

QID Name Tip
76 Minimum Window Substring (Hard) 滑动窗口
88 Merge Sorted Array (Easy)
142 Link List Cycle II (Medium) 快慢指针
167 Two Sum II (Easy)

二分查找

模板总结

QID Name
34 Find First and Last Position of Element in Sorted Array (Easy)
69 Sqrt(x) (Easy)
81 Search In Rotated Sorted Array II (Medium)

排序算法

QID Name Tip
215 Kth Largest Element (Medium) 快速选择
347 Top k Frequent Elements (Medium) 桶排序

优先搜索

QID Name Tip
417 Pacific Atlantic Waterflow (Medium) 深度优先搜索
547 Number of Provinces (Medium) 深度优先搜索
695 Max Area of Island (Medium) 深度优先搜索
46 Permutations (Medium) 回溯法
51 N-Queens (Hard) 回溯法
77 Combinations (Medium) 回溯法
79 Word Search (Medium) 回溯法
126 Word Ladder II (Hard) 广度优先搜索
934 Shortest Bridge (Medium) 广度优先搜索

动态规划

QID Name Tip
70 Climbing Stairs (Easy) 一维
198 Hourse Robber (Easy) 一维
413 Arithmetic Slices (Medium) 一维
64 Minimum Path Sum (Medium) 二维
542 0-1 Matrix (Medium) 二维
221 Maximal Square (Medium) 二维
279 Perfect Square (Medium) 分割问题
91 Decode Ways (Medium) 分割问题
139 Word Break (Medium) 分割问题
300 Logest Increasing Subsequence (Medium) 子序列问题
1143 Logest Common Subsequence (Medium) 子序列问题
416 Partition Equal Subset Sum (Medium) 背包问题
474 Ones and Zeros (Medium) 0-1背包问题
322 Coin Change (Medium) 完全背包问题
72 Edit Distance (Hard) 字符串编辑问题
650 2 Keys Keyboard (Medium) 字符串编辑问题
10 Regular Expression Matching (Hard) 字符串编辑问题
121 Best Time to Buy and Sell Stock (Easy) 股票交易问题
188 Best Time to Buy and Sell Stock IV (Hard) 股票交易问题
309 Best Time to Buy and Sell Stock with Cooldown (Medium) 股票交易问题

分治算法

QID Name
241 Different Ways to Add Parentheses

数据结构 - 链表

QID Name
21 Merge Two Sorted List (Easy)
24 Swap Nodes in Pairs (Easy)
160 Intersection of Two Linked Lists (Easy)
206 Reverse Linked List (Easy)
234 Palindrome Linked List (Easy)

数据结构 - 树

QID Name Tip
104 Maximum Depth of Binary Tree (Easy) 二叉树递归遍历
110 Balanced Binary Tree (Easy) 二叉树递归遍历
543 Diameter of Binary Tree (Easy) 二叉树递归遍历
437 Path Sum III (Medium) 二叉树递归遍历
101 Symmetric Tree (Easy) 二叉树递归遍历
1110 Delete Nodes And Return Forest (Medium) 二叉树递归遍历
637 Average of Levels in Binary Tree (Easy) 二叉树层次遍历
105 Construct Binary Tree from Preorder and Inorder Traversal (Medium) 二叉树前中序遍历
144 Binary Tree Preorder Traversal (Easy) 二叉树前序遍历
99 Recover Binary Search Tree (Medium) 二叉查找树
669 Trim a Binary Search Tree (Easy) 二叉查找树
208 Implement Trie (Prefix Tree) (Medium) 前缀树 / 字典树

数据结构 - 图

QID Name Tip
785 Is Graphy Bipartite? (Medium) 二分图
210 Course Schedule II (Medium) 拓扑排序

数据结构 - 栈

QID Name Tip
946 Validate Stack Sequences

数据结构 - 其它

QID Name Tip
210 LRU Cache (Medium) LRU

Reference

About

My collection of algorithm and data structure solutions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published