开源软件名称:awangdev/LintCode
开源软件地址:https://github.com/awangdev/LintCode
开源编程语言:
Java
100.0%
开源软件介绍:
Disclaimer: 这里的题目跟具体的面试毫无关系, 也没有任何指向性; 这些题目是我当年在努力刷题的过程中积累下来的经验和总结!
简介
这个Github已经开启超过五年, 很高兴它可以帮到有需要的人. 信息有价, 知识无价, 每逢闲暇, 我会来维护这个repo, 给刷题的朋友们一些我的想法和见解.
下面来简单介绍一下:
- README.md: 所有所做过的题目
- ReviewPage.md: 所有题目的总结和归纳(不断完善中)
- KnowledgeHash2.md: 对所做过的知识点的一些笔记
- SystemDesign.md: 对系统设计的一些笔记
1/ 土汪 YouTube Channel
我的Youtube 频道: TuWang Tech未来会持续更新在北美科技行业工作的故事和经验.
希望在这里参考刷题经验时, 可以去关注我的频道! 搜"TuWang Tech"可以找到我. Youtube, Bilibili.
有任何程序员工作的疑问, 都可以给我留言/私信/邮件. wechat: TuWangZ, Instagram: TuWang.Z
希望大家学习顺利, 对未来充满希望!
一些老频道的视频:
2/ 目录 Java Algorithm Problems
Leetcode# |
Problem |
Level |
Tags |
Time |
Space |
Language |
Sequence |
N/A |
Jump Game II.java |
Hard |
[Array, Coordinate DP, DP, Greedy] |
O(n) |
O(1) |
Java |
0 |
N/A |
Majority Number II.java |
Medium |
[Enumeration, Greedy] |
|
|
Java |
1 |
N/A |
Search a 2D Matrix II.java |
Medium |
[Binary Search, Divide and Conquer] |
|
|
Java |
2 |
N/A |
Missing Ranges.java |
Medium |
[Array] |
|
|
Java |
3 |
N/A |
Inorder Successor in BST.java |
Medium |
[BST, Tree] |
|
|
Java |
4 |
N/A |
Convert Integer A to Integer B.java |
Easy |
[Bit Manipulation] |
|
|
Java |
5 |
N/A |
Backpack VI.java |
Medium |
[Backpack DP, DP] |
|
|
Java |
6 |
N/A |
Total Occurrence of Target.java |
Medium |
[] |
|
|
Java |
7 |
N/A |
House Robber III.java |
Medium |
[DFS, DP, Status DP, Tree] |
|
|
Java |
8 |
N/A |
Binary Tree Maximum Path Sum II.java |
Medium |
[DFS, Tree] |
|
|
Java |
9 |
N/A |
Backpack V.java |
Medium |
[Backpack DP, DP] |
|
|
Java |
10 |
N/A |
Closest Number in Sorted Array.java |
Easy |
[Binary Search] |
|
|
Java |
11 |
N/A |
Convert Expression to Polish Notation.java |
Hard |
[Binary Tree, DFS, Expression Tree, Stack] |
|
|
Java |
12 |
N/A |
Missing Number.java |
Easy |
[Array, Bit Manipulation, Math] |
|
|
Java |
13 |
N/A |
Restore IP Addresses.java |
Medium |
[Backtracking, DFS, String] |
|
|
Java |
14 |
N/A |
Linked List Cycle II.java |
Medium |
[Linked List, Math, Two Pointers] |
|
|
Java |
15 |
N/A |
Unique Binary Search Tree.java |
Medium |
[BST, DP, Tree] |
|
|
Java |
16 |
N/A |
Largest Number.java |
Medium |
[Sort] |
|
|
Java |
17 |
N/A |
Reverse String.java |
Easy |
[String, Two Pointers] |
|
|
Java |
18 |
N/A |
Triangles.java |
Medium |
[Array, Coordinate DP, DFS, DP, Memoization] |
|
|
Java |
19 |
N/A |
Frog Jump.java |
Hard |
[DP, Hash Table] |
|
|
Java |
20 |
N/A |
Summary Ranges.java |
Medium |
[Array] |
|
|
Java |
21 |
N/A |
Sliding Window Median.java |
Hard |
[Design, Heap, MaxHeap, MinHeap, Sliding Window] |
|
|
Java |
22 |
N/A |
Single Number III.java |
Medium |
[Bit Manipulation] |
|
|
Java |
23 |
N/A |
Trailing Zeros.java |
Easy |
[Math] |
|
|
Java |
24 |
N/A |
Fast Power.java |
Medium |
[DFS, Divide and Conquer] |
|
|
Java |
25 |
N/A |
Perfect Rectangle.java |
Hard |
[Design, Geometry, Hash Table] |
|
|
Java |
26 |
N/A |
Total Hamming Distance.java |
Medium |
[Bit Manipulation] |
O(n) |
O(1), 32-bit array |
Java |
27 |
N/A |
Word Pattern.java |
Easy |
[] |
|
|
Java |
28 |
N/A |
Two Sum IV - Input is a BST.java |
Easy |
[Tree] |
|
|
Java |
29 |
N/A |
Count 1 in Binary.java |
Easy |
[Bit Manipulation] |
|
|
Java |
30 |
N/A |
Two Lists Sum.java |
Medium |
[Linked List] |
|
|
Java |
31 |
N/A |
Flatten 2D Vector.java |
Medium |
[Design] |
|
|
Java |
32 |
N/A |
Hamming Distance.java |
Easy |
[] |
|
|
Java |
33 |
N/A |
Find the Weak Connected Component in the Directed Graph.java |
Medium |
[Union Find] |
|
|
Java |
34 |
N/A |
Interval Minimum Number.java |
Medium |
[Binary Search, Divide and Conquer, Lint, Segment Tree] |
|
|
Java |
35 |
N/A |
Stone Game.java |
Medium |
[DP] |
|
|
Java |
36 |
N/A |
Longest Increasing Continuous subsequence II.java |
Medium |
[Array, Coordinate DP, DP, Memoization] |
|
|
Java |
37 |
N/A |
Plus One.java |
Easy |
[Array, Math] |
|
|
Java |
38 |
N/A |
Paint Fence.java |
Easy |
[DP, Sequence DP] |
O(n) |
O(n) |
Java |
39 |
N/A |
Line Reflection.java |
Medium |
[Hash Table, Math] |
O(n) |
O(n) |
Java |
40 |
N/A |
Binary Representation.java |
Hard |
[Bit Manipulation, String] |
|
|
Java |
41 |
N/A |
Longest Consecutive Sequence.java |
Hard |
[Array, Hash Table, Union Find] |
|
|
Java |
42 |
N/A |
Find Minimum in Rotated Sorted Array.java |
Medium |
[Array, Binary Search] |
|
|
Java |
43 |
N/A |
Binary Tree Longest Consecutive Sequence II.java |
Medium |
[DFS, Divide and Conquer, Double Recursive, Tree] |
|
|
Java |
44 |
N/A |
Minimum Subarray.java |
Easy |
[Array, DP, Greedy, Sequence DP, Subarray] |
O(m) |
O(1) |
Java |
45 |
N/A |
Connecting Graph.java |
Medium |
[Union Find] |
|
|
Java |
46 |
N/A |
Count of Smaller Number.java |
Medium |
[Binary Search, Lint, Segment Tree] |
|
|
Java |
47 |
N/A |
Binary Gap.java |
Easy |
[Bit Manipulation] |
O(n), n = # of bits |
O(1) |
Java |
48 |
N/A |
Flip Game II.java |
Medium |
[Backtracking, DFS, DP] |
|
|
Java |
49 |
N/A |
Subtree of Another Tree.java |
Easy |
[DFS, Divide and Conquer, Tree] |
|
|
Java |
50 |
N/A |
Binary Tree Level Order Traversal II.java |
Medium |
[BFS, Tree] |
|
|
Java |
51 |
N/A |
Maximum Average Subarray I.java |
Easy |
[Array, Subarray] |
O(n) |
O(1) |
Java |
52 |
N/A |
IndexMatch.java |
Easy |
[] |
|
|
Java |
53 |
N/A |
Walls and Gates.java |
Medium |
[BFS, DFS] |
|
|
Java |
54 |
N/A |
Decode String.java |
Medium |
[DFS, Divide and Conquer, Stack] |
|
|
Java |
55 |
N/A |
The Maze.java |
Medium |
[BFS, DFS] |
|
|
Java |
56 |
N/A |
Palindromic Substrings.java |
Medium |
[DP, String] |
|
|
Java |
57 |
N/A |
Rearrange String k Distance Apart.java |
Hard |
[Greedy, Hash Table, Heap] |
|
|
Java |
58 |
N/A |
Count and Say.java |
Easy |
[Basic Implementation, String] |
|
|
Java |
59 |
N/A |
Median of Two Sorted Arrays.java |
Hard |
[Array, Binary Search, DFS, Divide and Conquer] |
|
|
Java |
60 |
N/A |
Perfect Squares.java |
Medium |
[BFS, DP, Math, Partition DP] |
|
|
Java |
61 |
N/A |
Word Search.java |
Medium |
[Array, Backtracking, DFS] |
|
|
Java |
62 |
N/A |
Backpack II.java |
Medium |
[Backpack DP, DP] |
|
|
Java |
63 |
N/A |
Reshape the Matrix.java |
Easy |
[] |
|
|
Java |
64 |
N/A |
Update Bits.java |
Medium |
[Bit Manipulation] |
|
|
Java |
65 |
N/A |
Triangle Count.java |
Medium |
[Array] |
|
|
Java |
66 |
N/A |
Remove Duplicate Letters.java |
Hard |
[Greedy, Hash Table, Stack] |
|
|
Java |
67 |
N/A |
Permutation Sequence.java |
Medium |
[Backtracking, Math] |
|
|
Java |
68 |
N/A |
House Robber II.java |
Medium |
[DP, Sequence DP, Status DP] |
|
|
Java |
69 |
N/A |
O(1) Check Power of 2.java |
Easy |
[Bit Manipulation] |
|
|
Java |
70 |
N/A |
Letter Combinations of a Phone Number.java |
Medium |
[Backtracking, String] |
|
|
Java |
71 |
N/A |
Backspace String Compare.java |
Easy |
[Stack, Two Pointers] |
|
|
Java |
72 |
N/A |
Minimum Size Subarray Sum.java |
Medium |
[Array, Binary Search, Subarray, Two Pointers] |
O(n) |
O(1) |
Java |
73 |
N/A |
Implement Stack using Queues.java |
Easy |
[Design, Stack] |
|
|
Java |
74 |
N/A |
Minimum Absolute Difference in BST.java |
Easy |
[BST] |
|
|
Java |
75 |
N/A |
Maximum Binary Tree.java |
Medium |
[Stack, Tree] |
|
|
Java |
76 |
N/A |
ColorGrid.java |
Medium |
[Design, Hash Table] |
|
|
Java |
77 |
N/A |
HashWithArray.java |
Easy |
[] |
|
|
Java |
78 |
N/A |
Flood Fill.java |
Easy |
[DFS] |
|
|
Java |
79 |
N/A |
Construct Binary Tree from Inorder and Postorder Traversal.java |
Medium |
[Array, DFS, Divide and Conquer, Tree] |
|
|
Java |
80 |
N/A |
Backpack.java |
Medium |
[Backpack DP, DP] |
|
|
Java |
81 |
N/A |
Longest Common Subsequence.java |
Medium |
[DP, Double Sequence DP, Sequence DP] |
|
|
Java |
82 |
N/A |
Peeking Iterator.java |
Medium |
[Design] |
|
|
Java |
83 |
N/A |
Orderly Queue.java |
Hard |
[Math, String] |
|
|
Java |
84 |
N/A |
QuickSort.java |
Medium |
[Quick Sort, Sort] |
|
|
Java |
85 |
N/A |
Maximal Rectangle.java |
Hard |
[Array, DP, Hash Table, Stack] |
|
|
Java |
86 |
N/A |
Expression Evaluation.java |
Hard |
[Binary Tree, DFS, Expression Tree, Minimum Binary Tree, Stack] |
|
|
Java |
87 |
N/A |
Subtree.java |
Easy |
[DFS, Tree] |
|
|
Java |
88 |
N/A |
LFU Cache.java |
Hard |
[Design, Hash Table] |
|
|
Java |
89 |
N/A |
Cosine Similarity.java |
Easy |
[Basic Implementation] |
|
|
Java |
90 |
N/A |
Scramble String.java |
Hard |
[DP, Interval DP, String] |
|
|
Java |
91 |
N/A |
Redundant Connection.java |
Medium |
[BFS, DFS, Graph, Tree, Union Find] |
|
|
Java |
92 |
N/A |
Rotate List.java |
Medium |
[Linked List, Two Pointers] |
|
|
Java |
93 |
N/A |
Swap Nodes in Pairs.java |
Medium |
[Linked List] |
|
|
Java |
94 |
N/A |
Longest Increasing Continuous subsequence.java |
Easy |
[Array, Coordinate DP, DP] |
|
|
Java |
95 |
N/A |
K Edit Distance.java |
Hard |
[DP, Double Sequence DP, Sequence DP, Trie] |
|
|
Java |
96 |
N/A |
Combinations.java |
Medium |
[Backtracking, Combination, DFS] |
|
|
Java |
97 |
N/A |
Max Area of Island.java |
Easy |
[Array, DFS] |
|
|
Java |
98 |
N/A |
Sort List.java |
Medium |
[Divide and Conquer, Linked List, Merge Sort, Sort] |
|
|
Java |
99 |
N/A |
Find Peak Element.java |
Medium |
[Array, Binary Search] |
|
|
Java |
100 |
N/A |
Word Search II.java |
Hard |
[Backtracking, DFS, Trie] |
|
|
Java |
101 |
N/A |
K Empty Slots.java |
Hard |
[Array, BST, TreeSet] |
|
|
Java |
102 |
N/A |
Gray Code.java |
Medium |
[Backtracking] |
|
|
Java |
103 |
N/A |
Encode and Decode TinyURL.java |
Medium |
[Hash Table, Math] |
|
|
Java |
104 |
N/A |
Game of Life.java |
Medium |
[Array] |
|
|
Java |
105 |
N/A |
Compare Version Numbers.java |
Medium |
[String] |
|
|
Java |
106 |
N/A |
Singleton.java |
Easy |
[Design] |
|
|
Java |
107 |
N/A |
Ugly Number.java |
Medium |
[Math] |
|
|
Java |
108 |
N/A |
Russian Doll Envelopes.java |
Hard |
[Binary Search, Coordinate DP, DP] |
|
|
Java |
109 |
N/A |
Rehashing.java |
Medium |
[Hash Table] |
|
|
Java |
110 |
N/A |
Kth Smallest Sum In Two Sorted Arrays.java |
Hard |
[] |
|
|
Java |
111 |
N/A |
Longest Common Substring.java |
Medium |
[DP, Double Sequence DP, Sequence DP, String] |
|
|
Java |
112 |
N/A |
Rotate Image.java |
Medium |
[Array, Enumeration] |
|
|
Java |
113 |
N/A |
Backpack III.java |
Hard |
[Backpack DP, DP] |
|
|
Java |
114 |
N/A |
Combination Sum IV.java |
Medium |
[Array, Backpack DP, DP] |
|
|
Java |
115 |
N/A |
Number of Longest Increasing Subsequence.java |
Medium |
[Coordinate DP, DP] |
O(n^2) |
|
Java |
116 |
N/A |
Permutation Index.java |
Easy |
[] |
|
|
Java |
117 |
N/A |
4Sum.java |
Medium |
[Hash Table] |
|
|
Java |
118 |
N/A |
Shortest Palindrome.java |
Hard |
[KMP, String] |
|
|
Java |
119 |
N/A |
Convert Sorted Array to Binary Search Tree.java |
Easy |
[DFS, Divide and Conquer, Tree] |
|
|
Java |
120 |
N/A |
Populating Next Right Pointers in Each Node.java |
Medium |
[DFS, Divide and Conquer, Tree] |
|
|
Java |
121 |
N/A |
Space Replacement.java |
Medium |
[String] |
|
|
Java |
122 |
N/A |
Contiguous Array.java |
Medium |
[Hash Table] |
|
|
Java |
123 |
N/A |
Reverse Linked List II .java |
Medium |
[Linked List] |
|
|
Java |
124 |
N/A |
Palindrome Pairs.java |
Hard |
[Hash Table, String, Trie] |
|
|
Java |
125 |
N/A |
Find Peak Element II.java |
Hard |
[Binary Search, DFS, Divide and Conquer] |
|
|
Java |
126 |
N/A |
Minimum Height Trees.java |
Medium |
[BFS, Graph] |
|
|
Java |
127 |
N/A |
Longest Substring Without Repeating Characters.java |
Medium |
[Hash Table, String, Two Pointers] |
|
|
Java |
128 |
N/A |
Fraction to Recurring Decimal.java |
Medium |
[Hash Table, Math] |
|
|
Java |
129 |
N/A |
Wiggle Sort.java |
Medium |
[Array, Sort] |
|
|
Java |
130 |
N/A |
Reverse Words in a String II.java |
Medium |
[String] |
|
|
Java |
131 |
N/A |
Remove Node in Binary Search Tree.java |
Hard |
[BST] |
|
|
Java |
132 |
N/A |
Reorder List.java |
Medium |
[Linked List] |
|
|
Java |
133 |
N/A |
Redundant Connection II.java |
Hard |
[DFS, Graph, Tree, Union Find] |
|
|
Java |
134 |
N/A |
[tool] Quick Select - Median.java |
Easy |
[Array, Lint, Quick Select, Quick Sort, Two Pointers] |
O(n) |
O(logN) |
Java |
135 |
N/A |
Swap Bits.java |
Easy |
[Bit Manipulation] |
|
|
Java |
136 |
N/A |
Friends Of Appropriate Ages.java |
Medium |
[Array, Math] |
|
|
Java |
137 |
N/A |
Longest Increasing Subsequence.java |
Medium |
[Binary Search, Coordinate DP, DP, Memoization] |
O(n^2) dp, O(nLogN) binary search |
O(n) |
Java |
138 |
N/A |
Power of Two.java |
Easy |
[Bit Manipulation, Math] |
|
|
Java |
139 |
N/A |
Min Stack.java |
Easy |
[Design, Stack] |
|
|
Java |
140 |
N/A |
Count of Smaller Number before itself.java |
Hard |
[] |
|
|
Java |
141 |
N/A |
Majority Number III.java |
Medium |
[Hash Table, Linked List] |
|
|
Java |
142 |
N/A |
Number of Digit One.java |
Hard |
[Math] |
|
|
Java |
143 |
N/A |
Tweaked Identical Binary Tree.java |
Easy |
[DFS, Tree] |
|
|
Java |
144 |
N/A |
Search Range in Binary Search Tree .java |
Medium |
[BST, Binary Tree] |
|
|
Java |
145 |
N/A |
Best Time to Buy and Sell Stock III.java |
Hard |
[Array, DP, Sequence DP] |
|
|
Java |
146 |
N/A |
Design Search Autocomplete System.java |
Hard |
[Design, Hash Table, MinHeap, PriorityQueue, Trie] |
input: O(x), where x = possible words, constructor: O(mn) m = max length, n = # of words |
O(n^2), n = # of possible words, n = # of trie levels; mainlay saving the Map<S, freq> |
Java |
147 |
N/A |
Subsets II.java |
Medium |
[Array, BFS, Backtracking, DFS] |
O(2^n) |
|
Java |
148 |
N/A |
One Edit Distance.java |
Medium |
[String] |
|
|
Java |
149 |
N/A |
Segment Tree Modify.java |
Medium |
[Binary Tree, DFS, Divide and Conquer, Lint, Segment Tree] |
|
|
Java |
150 |
N/A |
Distinct Subsequences.java |
Hard |
[DP, String] |
|
|
Java |
151 |
N/A |
Insert Node in a Binary Search Tree .java |
Easy |
[BST] |
|
|
Java |
152 |
N/A |
Container With Most Water.java |
Medium |
[Array, Two Pointers] |
|
|
Java |
153 |
N/A |
Word Ladder.java |
Medium |
[BFS] |
|
|
Java |
154 |
N/A |
Single Number II.java |
Medium |
[Bit Manipulation] |
|
|
Java |
155 |
N/A |
Heaters.java |
Easy |
[] |
|
|
Java |
156 |
N/A |
Kth Smallest Element in a BST.java |
Medium |
[BST, DFS, Stack, Tree] |
|
|
Java |
157 |
N/A |
Robot Room Cleaner.java |
Hard |
[Backtracking, DFS] |
|
|
Java |
158 |
N/A |
Coins in a Line II.java |
Medium |
[Array, DP, Game Theory, Memoization, MiniMax] |
|
|
Java |
159 |
N/A |
Partition List.java |
Medium |
[Linked List, Two Pointers] |
|
|
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18297|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9687|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8185|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8554|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8463|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9400|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8435|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7869|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8420|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7398|2022-11-06
|
请发表评论