xiexinch / LintCode

Java Solutions to problems on LintCode

Home Page:Http://www.ShawnFanDev.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java Algorithm Problems

前戏

To host Java Solutions to algorithm problems from LintCode, LeetCode...etc. I Will try to revise the solutions once new problem or new testing case occurs. Mid 2016 I realize that people may want to contribute to this repo, and make it better by contributing fixes, better solutions ... etc. Free free to send pull request. Once verified, I'm happy to merge in! CALM DOWN AND CODE ON! Fellows!

News

2017年1月17日, 陪我征战多年的 2014 MackBookPro i7 3.xGHz 被一杯清水结束了生命,在这里深切缅怀悼念。这个Git Repo是小M陪我一字一句打出来的,有过蹉跎,也有过辉煌,陪我从Day1刷题一直刷到了Day1之中。直至今日,小M记录的代码还在给广大coder带来福利。为了延续小M无私奉献的精神,我将重新在这个repo活跃起来,重整已有的问题,也会尝试总结一些System Design方面的想法,将小M还没有能够达成的梦想实现。

划重点

Squence Problem Level Language Video Tutorial
0 [2 Sum II - Input array is sorted.java](https://github.com/shawnfan/LintCode/blob/master/Java/2 Sum II - Input array is sorted.java) Medium Java
1 [2 Sum II.java](https://github.com/shawnfan/LintCode/blob/master/Java/2 Sum II.java) Medium Java
2 [2 Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/2 Sum.java) Medium Java Link
3 [3 Sum Closest.java](https://github.com/shawnfan/LintCode/blob/master/Java/3 Sum Closest.java) Medium Java
4 [3 Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/3 Sum.java) Medium Java
5 [3Sum Smaller.java](https://github.com/shawnfan/LintCode/blob/master/Java/3Sum Smaller.java) Java
6 [4 Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/4 Sum.java) Medium Java
7 A+B.java Easy Java
8 [Add and Search Word.java](https://github.com/shawnfan/LintCode/blob/master/Java/Add and Search Word.java) Medium Java
9 [Add Binary.java](https://github.com/shawnfan/LintCode/blob/master/Java/Add Binary.java) Easy Java
10 [Add Two Numbers II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Add Two Numbers II.java) Medium Java
11 [Add Two Numbers.java](https://github.com/shawnfan/LintCode/blob/master/Java/Add Two Numbers.java) Easy Java
12 [Alien Dictionary.java](https://github.com/shawnfan/LintCode/blob/master/Java/Alien Dictionary.java) Hard Java
13 Anagrams.java Medium Java
14 [Backpack II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Backpack II.java) Medium Java
15 Backpack.java Medium Java
16 [Balanced Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Balanced Binary Tree.java) Medium Java
17 [Best Time to Buy and Sell Stock I.java](https://github.com/shawnfan/LintCode/blob/master/Java/Best Time to Buy and Sell Stock I.java) Medium Java
18 [Best Time to Buy and Sell Stock II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Best Time to Buy and Sell Stock II.java) Medium Java
19 [Best Time to Buy and Sell Stock III .java](https://github.com/shawnfan/LintCode/blob/master/Java/Best Time to Buy and Sell Stock III .java) Medium Java
20 [Best Time to Buy and Sell Stock IV.java](https://github.com/shawnfan/LintCode/blob/master/Java/Best Time to Buy and Sell Stock IV.java) Hard Java
21 [Binary Representation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Representation.java) Hard Java
22 [Binary Search Tree Iterator.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Search Tree Iterator.java) Hard Java
23 [Binary Tree Inorder Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Inorder Traversal.java) Easy Java
24 [Binary Tree Level Order Traversal II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Level Order Traversal II.java) Medium Java
25 [Binary Tree Level Order Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Level Order Traversal.java) Medium Java
26 [Binary Tree Longest Consecutive Sequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Longest Consecutive Sequence.java) Medium Java
27 [Binary Tree Maximum Path Sum II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Maximum Path Sum II.java) Medium Java
28 [Binary Tree Maximum Path Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Maximum Path Sum.java) Medium Java
29 [Binary Tree Path Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Path Sum.java) Easy Java
30 [Binary Tree Paths.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Paths.java) Easy Java
31 [Binary Tree Postorder Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Postorder Traversal.java) Easy Java
32 [Binary Tree Preorder Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Preorder Traversal.java) Easy Java
33 [Binary Tree Right Side View.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Right Side View.java) Medium Java
34 [Binary Tree Serialization.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Serialization.java) Medium Java
35 [Binary Tree Zigzag Level Order Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Binary Tree Zigzag Level Order Traversal.java) Medium Java
36 [Building Outline.java](https://github.com/shawnfan/LintCode/blob/master/Java/Building Outline.java) Hard Java
37 [Burst Balloons.java](https://github.com/shawnfan/LintCode/blob/master/Java/Burst Balloons.java) Java
38 [Change to Anagram.java](https://github.com/shawnfan/LintCode/blob/master/Java/Change to Anagram.java) Easy Java
39 [Classical Binary Search.java](https://github.com/shawnfan/LintCode/blob/master/Java/Classical Binary Search.java) Easy Java
40 [Climbing Stairs.java](https://github.com/shawnfan/LintCode/blob/master/Java/Climbing Stairs.java) Easy Java
41 [Clone Graph.java](https://github.com/shawnfan/LintCode/blob/master/Java/Clone Graph.java) Medium Java
42 [Closest Binary Search Tree Value.java](https://github.com/shawnfan/LintCode/blob/master/Java/Closest Binary Search Tree Value.java) Easy Java
43 [Closest Number in Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Closest Number in Sorted Array.java) Easy Java
44 [Coins in a Line.java](https://github.com/shawnfan/LintCode/blob/master/Java/Coins in a Line.java) Java
45 ColorGrid.java Medium Java
46 [Combination Sum II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Combination Sum II.java) Medium Java
47 [Combination Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Combination Sum.java) Medium Java
48 Combinations.java Medium Java
49 [Compare Strings.java](https://github.com/shawnfan/LintCode/blob/master/Java/Compare Strings.java) Easy Java
50 [Complete Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Complete Binary Tree.java) Easy Java
51 [Construct Binary Tree from Inorder and Postorder Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Construct Binary Tree from Inorder and Postorder Traversal.java) Medium Java
52 [Construct Binary Tree from Inorder and Preorder Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Construct Binary Tree from Inorder and Preorder Traversal.java) Medium Java
53 [Container With Most Water.java](https://github.com/shawnfan/LintCode/blob/master/Java/Container With Most Water.java) Java
54 [Convert Binary Search Tree to Doubly Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Binary Search Tree to Doubly Linked List.java) Medium Java
55 [Convert Expression to Polish Notation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Expression to Polish Notation.java) Hard Java
56 [Convert Expression to Reverse Polish Notation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Expression to Reverse Polish Notation.java) Hard Java
57 [Convert Integer A to Integer B.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Integer A to Integer B.java) Easy Java
58 [Convert Sorted Array to Binary Search Tree With Minimal Height.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Sorted Array to Binary Search Tree With Minimal Height.java) Easy Java
59 [Convert Sorted List to Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Convert Sorted List to Binary Search Tree.java) Medium Java
60 [Copy List with Random Pointer.java](https://github.com/shawnfan/LintCode/blob/master/Java/Copy List with Random Pointer.java) Medium Java
61 [Cosine Similarity.java](https://github.com/shawnfan/LintCode/blob/master/Java/Cosine Similarity.java) Easy Java
62 [Count 1 in Binary.java](https://github.com/shawnfan/LintCode/blob/master/Java/Count 1 in Binary.java) Easy Java
63 [Count and Say.java](https://github.com/shawnfan/LintCode/blob/master/Java/Count and Say.java) Easy Java
64 [Count of Smaller Number before itself.java](https://github.com/shawnfan/LintCode/blob/master/Java/Count of Smaller Number before itself.java) Hard Java
65 [Count of Smaller Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Count of Smaller Number.java) Medium Java
66 [Count Primes.java](https://github.com/shawnfan/LintCode/blob/master/Java/Count Primes.java) Easy Java
67 [Course Schedule II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Course Schedule II.java) Medium Java
68 [Course Schedule.java](https://github.com/shawnfan/LintCode/blob/master/Java/Course Schedule.java) Medium Java
69 [Data Stream Median.java](https://github.com/shawnfan/LintCode/blob/master/Java/Data Stream Median.java) Hard Java
70 [Delete Digits.java](https://github.com/shawnfan/LintCode/blob/master/Java/Delete Digits.java) Medium Java
71 [Delete Node in the Middle of Singly Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Delete Node in the Middle of Singly Linked List.java) Easy Java
72 [Distinct Subsequences.java](https://github.com/shawnfan/LintCode/blob/master/Java/Distinct Subsequences.java) Hard Java
73 [Edit Distance.java](https://github.com/shawnfan/LintCode/blob/master/Java/Edit Distance.java) Medium Java
74 [Encode and Decode Strings.java](https://github.com/shawnfan/LintCode/blob/master/Java/Encode and Decode Strings.java) Medium Java
75 [ExcelSheetColumnNumber .java](https://github.com/shawnfan/LintCode/blob/master/Java/ExcelSheetColumnNumber .java) Easy Java
76 [Expression Evaluation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Expression Evaluation.java) Hard Java
77 [Expression Tree Build.java](https://github.com/shawnfan/LintCode/blob/master/Java/Expression Tree Build.java) Hard Java
78 [Fast Power.java](https://github.com/shawnfan/LintCode/blob/master/Java/Fast Power.java) Medium Java
79 Fibonacci.java Easy Java
80 [Find Minimum in Rotated Sorted Array II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find Minimum in Rotated Sorted Array II.java) Java
81 [Find Minimum in Rotated Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find Minimum in Rotated Sorted Array.java) Java
82 [Find Peak Element II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find Peak Element II.java) Java
83 [Find Peak Element.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find Peak Element.java) Java
84 [Find the Connected Component in the Undirected Graph.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find the Connected Component in the Undirected Graph.java) Medium Java
85 [Find the Weak Connected Component in the Directed Graph.java](https://github.com/shawnfan/LintCode/blob/master/Java/Find the Weak Connected Component in the Directed Graph.java) Medium Java
86 [First Bad Version.java](https://github.com/shawnfan/LintCode/blob/master/Java/First Bad Version.java) Medium Java
87 [First Missing Positive.java](https://github.com/shawnfan/LintCode/blob/master/Java/First Missing Positive.java) Java
88 [Flatten 2D Vector.java](https://github.com/shawnfan/LintCode/blob/master/Java/Flatten 2D Vector.java) Java
89 [Flatten Binary Tree to Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Flatten Binary Tree to Linked List.java) Easy Java
90 [Flattern 2D Vector.java](https://github.com/shawnfan/LintCode/blob/master/Java/Flattern 2D Vector.java) Java
91 [Flip Game II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Flip Game II.java) Java
92 [Flip Game.java](https://github.com/shawnfan/LintCode/blob/master/Java/Flip Game.java) Java
93 [Fraction to Recurring Decimal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Fraction to Recurring Decimal.java) Java
94 [Game of Life.java](https://github.com/shawnfan/LintCode/blob/master/Java/Game of Life.java) Java
95 [Gas Station.java](https://github.com/shawnfan/LintCode/blob/master/Java/Gas Station.java) Java
96 [Generate Parentheses.java](https://github.com/shawnfan/LintCode/blob/master/Java/Generate Parentheses.java) Java
97 [Graph Valid Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Graph Valid Tree.java) Medium Java
98 [Gray Code.java](https://github.com/shawnfan/LintCode/blob/master/Java/Gray Code.java) Medium Java
99 [Group Anagrams.java](https://github.com/shawnfan/LintCode/blob/master/Java/Group Anagrams.java) Medium Java
100 [Group Shifted Strings.java](https://github.com/shawnfan/LintCode/blob/master/Java/Group Shifted Strings.java) Easy Java
101 [H-Index II.java](https://github.com/shawnfan/LintCode/blob/master/Java/H-Index II.java) Java
102 H-Index.java Java
103 [Happy Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Happy Number.java) Easy Java
104 [Hash Function.java](https://github.com/shawnfan/LintCode/blob/master/Java/Hash Function.java) Easy Java
105 HashHeap.java Hard Java
106 HashWithArray.java Easy Java
107 HashWithCustomizedClass(LinkedList).java Medium Java
108 Heapify.java Medium Java
109 [House Robber II.java](https://github.com/shawnfan/LintCode/blob/master/Java/House Robber II.java) Medium Java
110 [House Robber III.java](https://github.com/shawnfan/LintCode/blob/master/Java/House Robber III.java) Hard Java
111 [House Robber.java](https://github.com/shawnfan/LintCode/blob/master/Java/House Robber.java) Easy Java
112 [Identical Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Identical Binary Tree.java) Easy Java
113 [Implement Queue by Two Stacks.java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement Queue by Two Stacks.java) Java
114 [Implement Stack by Two Queues.java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement Stack by Two Queues.java) Java
115 [Implement Stack.java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement Stack.java) Java
116 [Implement strStr().java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement strStr().java) Java
117 [Implement Trie (Prefix Tree).java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement Trie (Prefix Tree).java) Java
118 [Implement Trie.java](https://github.com/shawnfan/LintCode/blob/master/Java/Implement Trie.java) Medium Java
119 IndexMatch.java Easy Java
120 [Inorder Successor in Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Inorder Successor in Binary Search Tree.java) Medium Java
121 [Insert Interval.java](https://github.com/shawnfan/LintCode/blob/master/Java/Insert Interval.java) Easy Java
122 [Insert Node in a Binary Search Tree .java](https://github.com/shawnfan/LintCode/blob/master/Java/Insert Node in a Binary Search Tree .java) Easy Java
123 [Insertion Sort List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Insertion Sort List.java) Java
124 [Integer to English Words.java](https://github.com/shawnfan/LintCode/blob/master/Java/Integer to English Words.java) Java
125 [Interleaving Positive and Negative Numbers.java](https://github.com/shawnfan/LintCode/blob/master/Java/Interleaving Positive and Negative Numbers.java) Java
126 [Interleaving String.java](https://github.com/shawnfan/LintCode/blob/master/Java/Interleaving String.java) Java
127 [Intersection of Two Linked Lists.java](https://github.com/shawnfan/LintCode/blob/master/Java/Intersection of Two Linked Lists.java) Easy Java
128 [Interval Minimum Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Interval Minimum Number.java) Medium Java
129 [Interval Sum II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Interval Sum II.java) Hard Java
130 [Interval Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Interval Sum.java) Medium Java
131 [Invert Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Invert Binary Tree.java) Easy Java
132 [Isomorphic Strings.java](https://github.com/shawnfan/LintCode/blob/master/Java/Isomorphic Strings.java) Easy Java
133 [Jump Game II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Jump Game II.java) Hard Java
134 [Jump Game.java](https://github.com/shawnfan/LintCode/blob/master/Java/Jump Game.java) Medium Java
135 [Kth Largest Element.java](https://github.com/shawnfan/LintCode/blob/master/Java/Kth Largest Element.java) Medium Java
136 [Kth Smallest Element in a BST.java](https://github.com/shawnfan/LintCode/blob/master/Java/Kth Smallest Element in a BST.java) Java
137 [Kth Smallest Number in Sorted Matrix.java](https://github.com/shawnfan/LintCode/blob/master/Java/Kth Smallest Number in Sorted Matrix.java) Medium Java
138 [Kth Smallest Sum In Two Sorted Arrays.java](https://github.com/shawnfan/LintCode/blob/master/Java/Kth Smallest Sum In Two Sorted Arrays.java) Hard Java
139 [Largest Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Largest Number.java) Java
140 [Largest Rectangle in Histogram.java](https://github.com/shawnfan/LintCode/blob/master/Java/Largest Rectangle in Histogram.java) Java
141 [Last Position of Target.java](https://github.com/shawnfan/LintCode/blob/master/Java/Last Position of Target.java) Java
142 [Length of Last Word.java](https://github.com/shawnfan/LintCode/blob/master/Java/Length of Last Word.java) Java
143 [Letter Combinations of a Phone Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Letter Combinations of a Phone Number.java) Medium Java
144 [Linked List Cycle II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Linked List Cycle II.java) Java
145 [Linked List Cycle.java](https://github.com/shawnfan/LintCode/blob/master/Java/Linked List Cycle.java) Java
146 [Longest Common Prefix.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Common Prefix.java) Medium Java
147 [Longest Common Subsequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Common Subsequence.java) Java
148 [Longest Common Substring.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Common Substring.java) Java
149 [Longest Consecutive Sequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Consecutive Sequence.java) Java
150 [Longest Increasing Continuous subsequence II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Increasing Continuous subsequence II.java) Java
151 [Longest Increasing Continuous subsequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Increasing Continuous subsequence.java) Java
152 [Longest Increasing Subsequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Increasing Subsequence.java) Java
153 [Longest Palindromic Substring.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Palindromic Substring.java) Medium Java
154 [Longest Substring with At Most K Distinct Characters.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Substring with At Most K Distinct Characters.java) Medium Java
155 [Longest Substring Without Repeating Characters.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Substring Without Repeating Characters.java) Medium Java
156 [Longest Words.java](https://github.com/shawnfan/LintCode/blob/master/Java/Longest Words.java) Java
157 [Lowest Common Ancestor II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Lowest Common Ancestor II.java) Easy Java
158 [Lowest Common Ancestor of a Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Lowest Common Ancestor of a Binary Search Tree.java) Medium Java
159 [Lowest Common Ancestor.java](https://github.com/shawnfan/LintCode/blob/master/Java/Lowest Common Ancestor.java) Easy Java
160 [LRU Cache.java](https://github.com/shawnfan/LintCode/blob/master/Java/LRU Cache.java) Hard Java
161 [Majority Number II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Majority Number II.java) Medium Java
162 [Majority Number III.java](https://github.com/shawnfan/LintCode/blob/master/Java/Majority Number III.java) Medium Java
163 [Majority Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Majority Number.java) Easy Java
164 [Matrix Zigzag Traversal.java](https://github.com/shawnfan/LintCode/blob/master/Java/Matrix Zigzag Traversal.java) Easy Java
165 [Max Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Max Tree.java) Hard Java
166 [Maximal Square.java](https://github.com/shawnfan/LintCode/blob/master/Java/Maximal Square.java) Medium Java
167 [Maximum Depth of Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Maximum Depth of Binary Tree.java) Easy Java
168 [Maximum Product Subarray.java](https://github.com/shawnfan/LintCode/blob/master/Java/Maximum Product Subarray.java) Java
169 [Maximum Subarray III.java](https://github.com/shawnfan/LintCode/blob/master/Java/Maximum Subarray III.java) Java
170 MaximumSubarray.java Java
171 MaximumSubarrayII.java Java
172 [Median of two Sorted Arrays.java](https://github.com/shawnfan/LintCode/blob/master/Java/Median of two Sorted Arrays.java) Hard Java
173 Median.java Java
174 [Meeting Rooms II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Meeting Rooms II.java) Medium Java
175 [Meeting Rooms.java](https://github.com/shawnfan/LintCode/blob/master/Java/Meeting Rooms.java) Easy Java
176 [Merge Intervals.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge Intervals.java) Easy Java
177 [Merge k Sorted Arrays.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge k Sorted Arrays.java) Medium Java
178 [Merge k Sorted Lists.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge k Sorted Lists.java) Medium Java
179 [Merge Sorted Array II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge Sorted Array II.java) Java
180 [Merge Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge Sorted Array.java) Easy Java
181 [Merge Two Sorted List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge Two Sorted List.java) Easy Java
182 [Merge Two Sorted Lists.java](https://github.com/shawnfan/LintCode/blob/master/Java/Merge Two Sorted Lists.java) Java
183 [Middle of Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Middle of Linked List.java) Java
184 [Min Stack.java](https://github.com/shawnfan/LintCode/blob/master/Java/Min Stack.java) Easy Java
185 [Minimum Height Trees.java](https://github.com/shawnfan/LintCode/blob/master/Java/Minimum Height Trees.java) Java
186 [Minimum Path Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Minimum Path Sum.java) Java
187 [Minimum Size Subarray Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Minimum Size Subarray Sum.java) Medium Java
188 [Minimum Subarray.java](https://github.com/shawnfan/LintCode/blob/master/Java/Minimum Subarray.java) Java
189 [Minimum Window Substring.java](https://github.com/shawnfan/LintCode/blob/master/Java/Minimum Window Substring.java) Hard Java
190 MinimumDepthOfBinaryTree.java Easy Java
191 [Missing Ranges.java](https://github.com/shawnfan/LintCode/blob/master/Java/Missing Ranges.java) Java
192 [Multiply Strings.java](https://github.com/shawnfan/LintCode/blob/master/Java/Multiply Strings.java) Medium Java
193 [Next Permutation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Next Permutation.java) Medium Java
194 [Nim Game.java](https://github.com/shawnfan/LintCode/blob/master/Java/Nim Game.java) Java
195 NQueens.java Java
196 NQueensII.java Java
197 [Nth to Last Node in List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Nth to Last Node in List.java) Java
198 [Number of Airplane in the sky.java](https://github.com/shawnfan/LintCode/blob/master/Java/Number of Airplane in the sky.java) Medium Java
199 [Number of Islands II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Number of Islands II.java) Hard Java
200 [Number of Islands.java](https://github.com/shawnfan/LintCode/blob/master/Java/Number of Islands.java) Medium Java
201 [Number Triangles.java](https://github.com/shawnfan/LintCode/blob/master/Java/Number Triangles.java) Java
202 [O(1) Check Power of 2.java](https://github.com/shawnfan/LintCode/blob/master/Java/O(1) Check Power of 2.java) Java
203 [One Edit Distance.java](https://github.com/shawnfan/LintCode/blob/master/Java/One Edit Distance.java) Medium Java
204 [Paint Fence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Paint Fence.java) Java
205 [Palindrome Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Palindrome Linked List.java) Java
206 [Palindrome Partitioning II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Palindrome Partitioning II.java) Java
207 [Palindrome Partitioning.java](https://github.com/shawnfan/LintCode/blob/master/Java/Palindrome Partitioning.java) Java
208 [Palindrome Permutation II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Palindrome Permutation II.java) Medium Java
209 [Palindrome Permutation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Palindrome Permutation.java) Easy Java
210 [Partition Array by Odd and Even.java](https://github.com/shawnfan/LintCode/blob/master/Java/Partition Array by Odd and Even.java) Java
211 [Partition Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Partition Array.java) Java
212 [Partition List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Partition List.java) Java
213 [Pascal's Triangle II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Pascal's Triangle II.java) Easy Java
214 [Peeking Iterator.java](https://github.com/shawnfan/LintCode/blob/master/Java/Peeking Iterator.java) Java
215 [Perfect Squares.java](https://github.com/shawnfan/LintCode/blob/master/Java/Perfect Squares.java) Java
216 [Permutation Index.java](https://github.com/shawnfan/LintCode/blob/master/Java/Permutation Index.java) Easy Java
217 [Permutation Sequence.java](https://github.com/shawnfan/LintCode/blob/master/Java/Permutation Sequence.java) Medium Java
218 [Permutations II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Permutations II.java) Medium Java
219 Permutations.java Medium Java
220 [Plus One.java](https://github.com/shawnfan/LintCode/blob/master/Java/Plus One.java) Java
221 [Populating Next Right Pointers in Each Node II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Populating Next Right Pointers in Each Node II.java) Hard Java
222 [Populating Next Right Pointers in Each Node.java](https://github.com/shawnfan/LintCode/blob/master/Java/Populating Next Right Pointers in Each Node.java) Medium Java
223 Pow(x,n).java Java
224 [Power of Three.java](https://github.com/shawnfan/LintCode/blob/master/Java/Power of Three.java) Easy Java
225 [Product of Array Exclude Itself.java](https://github.com/shawnfan/LintCode/blob/master/Java/Product of Array Exclude Itself.java) Java
226 QuickSort.java Easy Java
227 [Recover Rotated Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Recover Rotated Sorted Array.java) Java
228 Rehashing.java Medium Java
229 [Remove Duplicates from Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Duplicates from Sorted Array.java) Java
230 [Remove Duplicates from Sorted List II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Duplicates from Sorted List II.java) Java
231 [Remove Duplicates from Sorted List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Duplicates from Sorted List.java) Java
232 [Remove Duplicates from Unsorted List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Duplicates from Unsorted List.java) Java
233 [Remove Linked List Elements.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Linked List Elements.java) Java
234 [Remove Node in Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Node in Binary Search Tree.java) Hard Java
235 [Remove Nth Node From End of List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Remove Nth Node From End of List.java) Java
236 [Reorder List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Reorder List.java) Java
237 [Restore IP Addresses.java](https://github.com/shawnfan/LintCode/blob/master/Java/Restore IP Addresses.java) Java
238 [Reverse Integer.java](https://github.com/shawnfan/LintCode/blob/master/Java/Reverse Integer.java) Java
239 [Reverse Linked List II .java](https://github.com/shawnfan/LintCode/blob/master/Java/Reverse Linked List II .java) Java
240 [Reverse Linked List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Reverse Linked List.java) Easy Java
241 [Reverse Words in a String II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Reverse Words in a String II.java) Medium Java
242 [Reverse Words in a String.java](https://github.com/shawnfan/LintCode/blob/master/Java/Reverse Words in a String.java) Medium Java
243 reverseInteger.java Java
244 [Roman to Integer.java](https://github.com/shawnfan/LintCode/blob/master/Java/Roman to Integer.java) Easy Java
245 [Rotate Image.java](https://github.com/shawnfan/LintCode/blob/master/Java/Rotate Image.java) Medium Java
246 [Rotate List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Rotate List.java) Java
247 [Rotate String.java](https://github.com/shawnfan/LintCode/blob/master/Java/Rotate String.java) Java
248 [Search a 2D Matrix II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search a 2D Matrix II.java) Java
249 [Search a 2D Matrix.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search a 2D Matrix.java) Java
250 [Search for a Range.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search for a Range.java) Java
251 [Search Insert Position.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search Insert Position.java) Java
252 [Search Range in Binary Search Tree .java](https://github.com/shawnfan/LintCode/blob/master/Java/Search Range in Binary Search Tree .java) Medium Java
253 [Search Rotated in Sorted Array II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search Rotated in Sorted Array II.java) Java
254 [Search Rotated in Sorted Array.java](https://github.com/shawnfan/LintCode/blob/master/Java/Search Rotated in Sorted Array.java) Hard Java
255 [Segment Tree Build II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Segment Tree Build II.java) Medium Java
256 [Segment Tree Build.java](https://github.com/shawnfan/LintCode/blob/master/Java/Segment Tree Build.java) Medium Java
257 [Segment Tree Modify.java](https://github.com/shawnfan/LintCode/blob/master/Java/Segment Tree Modify.java) Medium Java
258 [Segment Tree Query II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Segment Tree Query II.java) Medium Java
259 [Segment Tree Query.java](https://github.com/shawnfan/LintCode/blob/master/Java/Segment Tree Query.java) Medium Java
260 [Serilization and Deserialization Of Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Serilization and Deserialization Of Binary Tree.java) Java
261 [Single Number II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Single Number II.java) Java
262 [Single Number III.java](https://github.com/shawnfan/LintCode/blob/master/Java/Single Number III.java) Java
263 [Single Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Single Number.java) Java
264 Singleton.java Java
265 [Sliding Window Maximum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sliding Window Maximum.java) Java
266 [Sliding Window Median.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sliding Window Median.java) Java
267 [Sort Color.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sort Color.java) Java
268 [Sort Colors II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sort Colors II.java) Java
269 [Sort Letters by Case.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sort Letters by Case.java) Java
270 [Sort List.java](https://github.com/shawnfan/LintCode/blob/master/Java/Sort List.java) Java
271 [Space Replacement.java](https://github.com/shawnfan/LintCode/blob/master/Java/Space Replacement.java) Java
272 Sqrt(x).java Java
273 [Stone Game.java](https://github.com/shawnfan/LintCode/blob/master/Java/Stone Game.java) Java
274 [String to Integer(atoi).java](https://github.com/shawnfan/LintCode/blob/master/Java/String to Integer(atoi).java) Easy Java
275 [Strobogrammatic Number II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Strobogrammatic Number II.java) Java
276 [Strobogrammatic Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Strobogrammatic Number.java) Java
277 StrStr.java Java
278 [Subarray Sum Closest.java](https://github.com/shawnfan/LintCode/blob/master/Java/Subarray Sum Closest.java) Medium Java
279 [Subarray Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Subarray Sum.java) Easy Java
280 Subset.java Medium Java
281 [Subsets II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Subsets II.java) Medium Java
282 Subtree.java Easy Java
283 [Summary Ranges.java](https://github.com/shawnfan/LintCode/blob/master/Java/Summary Ranges.java) Java
284 [Surrounded Regions.java](https://github.com/shawnfan/LintCode/blob/master/Java/Surrounded Regions.java) Java
285 [Swap Nodes in Pairs.java](https://github.com/shawnfan/LintCode/blob/master/Java/Swap Nodes in Pairs.java) Java
286 [Symmetric Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Symmetric Binary Tree.java) Easy Java
287 [The Smallest Difference.java](https://github.com/shawnfan/LintCode/blob/master/Java/The Smallest Difference.java) Java
288 [Top K Frequent Words.java](https://github.com/shawnfan/LintCode/blob/master/Java/Top K Frequent Words.java) Medium Java
289 [Topological Sorting.java](https://github.com/shawnfan/LintCode/blob/master/Java/Topological Sorting.java) Medium Java
290 [Total Occurrence of Target.java](https://github.com/shawnfan/LintCode/blob/master/Java/Total Occurrence of Target.java) Java
291 [Trailing Zeros.java](https://github.com/shawnfan/LintCode/blob/master/Java/Trailing Zeros.java) Java
292 [Trapping Rain Water II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Trapping Rain Water II.java) Hard Java
293 [Trapping Rain Water.java](https://github.com/shawnfan/LintCode/blob/master/Java/Trapping Rain Water.java) Medium Java
294 [Triangle Count.java](https://github.com/shawnfan/LintCode/blob/master/Java/Triangle Count.java) Java
295 [Tweaked Identical Binary Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Tweaked Identical Binary Tree.java) Easy Java
296 [Two Lists Sum.java](https://github.com/shawnfan/LintCode/blob/master/Java/Two Lists Sum.java) Java
297 [Two Strings Are Anagrams.java](https://github.com/shawnfan/LintCode/blob/master/Java/Two Strings Are Anagrams.java) Easy Java
298 [Ugly Number II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Ugly Number II.java) Java
299 [Ugly Number.java](https://github.com/shawnfan/LintCode/blob/master/Java/Ugly Number.java) Medium Java
300 [Unique Binary Search Tree II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Binary Search Tree II.java) Java
301 [Unique Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Binary Search Tree.java) Java
302 [Unique Characters.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Characters.java) Java
303 [Unique Path.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Path.java) Medium Java
304 [Unique Paths II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Paths II.java) Java
305 [Unique Word Abbreviation.java](https://github.com/shawnfan/LintCode/blob/master/Java/Unique Word Abbreviation.java) Java
306 [Update Bits.java](https://github.com/shawnfan/LintCode/blob/master/Java/Update Bits.java) Java
307 [Valid Anagram.java](https://github.com/shawnfan/LintCode/blob/master/Java/Valid Anagram.java) Java
308 [Valid Palindrome.java](https://github.com/shawnfan/LintCode/blob/master/Java/Valid Palindrome.java) Easy Java Link
309 [Valid Parentheses.java](https://github.com/shawnfan/LintCode/blob/master/Java/Valid Parentheses.java) Easy Java
310 [Valid Sudoku.java](https://github.com/shawnfan/LintCode/blob/master/Java/Valid Sudoku.java) Easy Java
311 [Validate Binary Search Tree.java](https://github.com/shawnfan/LintCode/blob/master/Java/Validate Binary Search Tree.java) Medium Java
312 [Wiggle Sort.java](https://github.com/shawnfan/LintCode/blob/master/Java/Wiggle Sort.java) Java
313 [Wood Cut.java](https://github.com/shawnfan/LintCode/blob/master/Java/Wood Cut.java) Java
314 [Word Break II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Break II.java) Hard Java
315 [Word Break.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Break.java) Medium Java
316 [Word Ladder II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Ladder II.java) Hard Java
317 [Word Ladder.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Ladder.java) Medium Java
318 [Word Pattern.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Pattern.java) Easy Java
319 [Word Search II.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Search II.java) Hard Java
320 [Word Search.java](https://github.com/shawnfan/LintCode/blob/master/Java/Word Search.java) Medium Java
321 [Zigzag Iterator.java](https://github.com/shawnfan/LintCode/blob/master/Java/Zigzag Iterator.java) Java

About

Java Solutions to problems on LintCode

Http://www.ShawnFanDev.com


Languages

Language:Java 100.0%