# LintCode **Repository Path**: williamjava/LintCode ## Basic Information - **Project Name**: LintCode - **Description**: Java Solutions to problems on LintCode/LeetCode - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-16 - **Last Updated**: 2021-12-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![home](https://user-images.githubusercontent.com/10102793/115952522-45a10a00-a49b-11eb-825e-08f913d9bbbf.png) # 简介 这个Github已经开启超过五年, 很高兴它可以帮到有需要的人. 信息有价, 知识无价, 每逢闲暇, 我会来维护这个repo, 给刷题的朋友们一些我的想法和见解. 下面来简单介绍一下: - **README.md**: 所有所做过的题目 - **ReviewPage.md**: 所有题目的总结和归纳(不断完善中) - **KnowledgeHash2.md**: 对所做过的知识点的一些笔记 - **SystemDesign.md**: 对系统设计的一些笔记 ## 1/ 程序員土汪 YouTube 学习工作视频 * [我拒绝了Uber $200万刀/4y的Offer | I declined the $2M offer from Uber and went to ...](https://youtu.be/RtQFzb77dGY) * [薪资大公开 - 2021年, 北美软件工程师, 一年赚多少? (Google vs Amazon) | How much do I make as a Software Engineer (2021)](https://youtu.be/nmgyT_m1j3s) * [为什么我选择放弃亚马逊的工作 | Why I left Amazon as a Software Engineer (2021)](https://youtu.be/BBpivK4I_8U) * [曾经的留级生, 今天一线大厂软件工程师! | The making of a software engineer(2021)](https://youtu.be/cACqlpXKRpY) * [看了这些, 还想去美国留学吗? 我的留学经历 (2020)](https://youtu.be/XqOA5q5Rtpw) * [如何拿到亚马逊的工作! How succeed in Amazon Interview! (2019)](https://youtu.be/NIuOjjKaK9M) * [十分钟学会Python? (2019)](https://youtu.be/DRQYOdO9BAU) * [刚到美国到底怎样开口说英文? (2019)](https://youtu.be/pd3WR5K-bLs) 我的[Youtube Channel](https://www.youtube.com/channel/UCQNPegv0VqempHNYPWKkVNw)未来会更新这些方面的内容: * 工作经验的分享: 当然会跟Software Engineer比较相关 * 在美国的学生时代的经历 希望在这里参考刷题经验时, 可以去关注我的频道! 搜"土汪/TuwangZ"可以找到我. [Youtube: 土汪](https://www.youtube.com/channel/UCQNPegv0VqempHNYPWKkVNw), [Bilibili: 土汪](https://space.bilibili.com/249496206). 有任何程序员工作的疑问, 都可以给我留言/私信/邮件. wechat: TuWangZ, Instagram: TuWang.Z 希望大家学习顺利, 对未来充满希望! # 2/ 目录 Java Algorithm Problems | Leetcode# | Problem | Level | Tags | Time | Space | Language | Sequence | |:---------:|:------------|:------:|:----:|-----:|------:|:--------:|---------:| |N/A|[Jump Game II.java](https://github.com/awangdev/LintCode/blob/master/Java/Jump%20Game%20II.java)|Hard|[Array, Coordinate DP, DP, Greedy]|O(n)|O(1)|Java|0| |N/A|[Majority Number II.java](https://github.com/awangdev/LintCode/blob/master/Java/Majority%20Number%20II.java)|Medium|[Enumeration, Greedy]|||Java|1| |N/A|[Search a 2D Matrix II.java](https://github.com/awangdev/LintCode/blob/master/Java/Search%20a%202D%20Matrix%20II.java)|Medium|[Binary Search, Divide and Conquer]|||Java|2| |N/A|[Missing Ranges.java](https://github.com/awangdev/LintCode/blob/master/Java/Missing%20Ranges.java)|Medium|[Array]|||Java|3| |N/A|[Inorder Successor in BST.java](https://github.com/awangdev/LintCode/blob/master/Java/Inorder%20Successor%20in%20BST.java)|Medium|[BST, Tree]|||Java|4| |N/A|[Convert Integer A to Integer B.java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Integer%20A%20to%20Integer%20B.java)|Easy|[Bit Manipulation]|||Java|5| |N/A|[Backpack VI.java](https://github.com/awangdev/LintCode/blob/master/Java/Backpack%20VI.java)|Medium|[Backpack DP, DP]|||Java|6| |N/A|[Total Occurrence of Target.java](https://github.com/awangdev/LintCode/blob/master/Java/Total%20Occurrence%20of%20Target.java)|Medium|[]|||Java|7| |N/A|[House Robber III.java](https://github.com/awangdev/LintCode/blob/master/Java/House%20Robber%20III.java)|Medium|[DFS, DP, Status DP, Tree]|||Java|8| |N/A|[Binary Tree Maximum Path Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Tree%20Maximum%20Path%20Sum%20II.java)|Medium|[DFS, Tree]|||Java|9| |N/A|[Backpack V.java](https://github.com/awangdev/LintCode/blob/master/Java/Backpack%20V.java)|Medium|[Backpack DP, DP]|||Java|10| |N/A|[Closest Number in Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Closest%20Number%20in%20Sorted%20Array.java)|Easy|[Binary Search]|||Java|11| |N/A|[Convert Expression to Polish Notation.java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Expression%20to%20Polish%20Notation.java)|Hard|[Binary Tree, DFS, Expression Tree, Stack]|||Java|12| |N/A|[Missing Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Missing%20Number.java)|Easy|[Array, Bit Manipulation, Math]|||Java|13| |N/A|[Restore IP Addresses.java](https://github.com/awangdev/LintCode/blob/master/Java/Restore%20IP%20Addresses.java)|Medium|[Backtracking, DFS, String]|||Java|14| |N/A|[Linked List Cycle II.java](https://github.com/awangdev/LintCode/blob/master/Java/Linked%20List%20Cycle%20II.java)|Medium|[Linked List, Math, Two Pointers]|||Java|15| |N/A|[Unique Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Unique%20Binary%20Search%20Tree.java)|Medium|[BST, DP, Tree]|||Java|16| |N/A|[Largest Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Largest%20Number.java)|Medium|[Sort]|||Java|17| |N/A|[Reverse String.java](https://github.com/awangdev/LintCode/blob/master/Java/Reverse%20String.java)|Easy|[String, Two Pointers]|||Java|18| |N/A|[Triangles.java](https://github.com/awangdev/LintCode/blob/master/Java/Triangles.java)|Medium|[Array, Coordinate DP, DFS, DP, Memoization]|||Java|19| |N/A|[Frog Jump.java](https://github.com/awangdev/LintCode/blob/master/Java/Frog%20Jump.java)|Hard|[DP, Hash Table]|||Java|20| |N/A|[Summary Ranges.java](https://github.com/awangdev/LintCode/blob/master/Java/Summary%20Ranges.java)|Medium|[Array]|||Java|21| |N/A|[Sliding Window Median.java](https://github.com/awangdev/LintCode/blob/master/Java/Sliding%20Window%20Median.java)|Hard|[Design, Heap, MaxHeap, MinHeap, Sliding Window]|||Java|22| |N/A|[Single Number III.java](https://github.com/awangdev/LintCode/blob/master/Java/Single%20Number%20III.java)|Medium|[Bit Manipulation]|||Java|23| |N/A|[Trailing Zeros.java](https://github.com/awangdev/LintCode/blob/master/Java/Trailing%20Zeros.java)|Easy|[Math]|||Java|24| |N/A|[Fast Power.java](https://github.com/awangdev/LintCode/blob/master/Java/Fast%20Power.java)|Medium|[DFS, Divide and Conquer]|||Java|25| |N/A|[Perfect Rectangle.java](https://github.com/awangdev/LintCode/blob/master/Java/Perfect%20Rectangle.java)|Hard|[Design, Geometry, Hash Table]|||Java|26| |N/A|[Total Hamming Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/Total%20Hamming%20Distance.java)|Medium|[Bit Manipulation]|O(n)|O(1), 32-bit array|Java|27| |N/A|[Word Pattern.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Pattern.java)|Easy|[]|||Java|28| |N/A|[Two Sum IV - Input is a BST.java](https://github.com/awangdev/LintCode/blob/master/Java/Two%20Sum%20IV%20-%20Input%20is%20a%20BST.java)|Easy|[Tree]|||Java|29| |N/A|[Count 1 in Binary.java](https://github.com/awangdev/LintCode/blob/master/Java/Count%201%20in%20Binary.java)|Easy|[Bit Manipulation]|||Java|30| |N/A|[Two Lists Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/Two%20Lists%20Sum.java)|Medium|[Linked List]|||Java|31| |N/A|[Flatten 2D Vector.java](https://github.com/awangdev/LintCode/blob/master/Java/Flatten%202D%20Vector.java)|Medium|[Design]|||Java|32| |N/A|[Hamming Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/Hamming%20Distance.java)|Easy|[]|||Java|33| |N/A|[Find the Weak Connected Component in the Directed Graph.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20the%20Weak%20Connected%20Component%20in%20the%20Directed%20Graph.java)|Medium|[Union Find]|||Java|34| |N/A|[Interval Minimum Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Interval%20Minimum%20Number.java)|Medium|[Binary Search, Divide and Conquer, Lint, Segment Tree]|||Java|35| |N/A|[Stone Game.java](https://github.com/awangdev/LintCode/blob/master/Java/Stone%20Game.java)|Medium|[DP]|||Java|36| |N/A|[Longest Increasing Continuous subsequence II.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Increasing%20Continuous%20subsequence%20II.java)|Medium|[Array, Coordinate DP, DP, Memoization]|||Java|37| |N/A|[Plus One.java](https://github.com/awangdev/LintCode/blob/master/Java/Plus%20One.java)|Easy|[Array, Math]|||Java|38| |N/A|[Paint Fence.java](https://github.com/awangdev/LintCode/blob/master/Java/Paint%20Fence.java)|Easy|[DP, Sequence DP]|O(n)|O(n)|Java|39| |N/A|[Line Reflection.java](https://github.com/awangdev/LintCode/blob/master/Java/Line%20Reflection.java)|Medium|[Hash Table, Math]|O(n)|O(n)|Java|40| |N/A|[Binary Representation.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Representation.java)|Hard|[Bit Manipulation, String]|||Java|41| |N/A|[Longest Consecutive Sequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Consecutive%20Sequence.java)|Hard|[Array, Hash Table, Union Find]|||Java|42| |N/A|[Find Minimum in Rotated Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20Minimum%20in%20Rotated%20Sorted%20Array.java)|Medium|[Array, Binary Search]|||Java|43| |N/A|[Binary Tree Longest Consecutive Sequence II.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Tree%20Longest%20Consecutive%20Sequence%20II.java)|Medium|[DFS, Divide and Conquer, Double Recursive, Tree]|||Java|44| |N/A|[Minimum Subarray.java](https://github.com/awangdev/LintCode/blob/master/Java/Minimum%20Subarray.java)|Easy|[Array, DP, Greedy, Sequence DP, Subarray]|O(m)|O(1)|Java|45| |N/A|[Connecting Graph.java](https://github.com/awangdev/LintCode/blob/master/Java/Connecting%20Graph.java)|Medium|[Union Find]|||Java|46| |N/A|[Count of Smaller Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Count%20of%20Smaller%20Number.java)|Medium|[Binary Search, Lint, Segment Tree]|||Java|47| |N/A|[Binary Gap.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Gap.java)|Easy|[Bit Manipulation]|O(n), n = # of bits|O(1)|Java|48| |N/A|[Flip Game II.java](https://github.com/awangdev/LintCode/blob/master/Java/Flip%20Game%20II.java)|Medium|[Backtracking, DFS, DP]|||Java|49| |N/A|[Subtree of Another Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Subtree%20of%20Another%20Tree.java)|Easy|[DFS, Divide and Conquer, Tree]|||Java|50| |N/A|[Binary Tree Level Order Traversal II.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Tree%20Level%20Order%20Traversal%20II.java)|Medium|[BFS, Tree]|||Java|51| |N/A|[Maximum Average Subarray I.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Average%20Subarray%20I.java)|Easy|[Array, Subarray]|O(n)|O(1)|Java|52| |N/A|[IndexMatch.java](https://github.com/awangdev/LintCode/blob/master/Java/IndexMatch.java)|Easy|[]|||Java|53| |N/A|[Walls and Gates.java](https://github.com/awangdev/LintCode/blob/master/Java/Walls%20and%20Gates.java)|Medium|[BFS, DFS]|||Java|54| |N/A|[Decode String.java](https://github.com/awangdev/LintCode/blob/master/Java/Decode%20String.java)|Medium|[DFS, Divide and Conquer, Stack]|||Java|55| |N/A|[The Maze.java](https://github.com/awangdev/LintCode/blob/master/Java/The%20Maze.java)|Medium|[BFS, DFS]|||Java|56| |N/A|[Palindromic Substrings.java](https://github.com/awangdev/LintCode/blob/master/Java/Palindromic%20Substrings.java)|Medium|[DP, String]|||Java|57| |N/A|[Rearrange String k Distance Apart.java](https://github.com/awangdev/LintCode/blob/master/Java/Rearrange%20String%20k%20Distance%20Apart.java)|Hard|[Greedy, Hash Table, Heap]|||Java|58| |N/A|[Count and Say.java](https://github.com/awangdev/LintCode/blob/master/Java/Count%20and%20Say.java)|Easy|[Basic Implementation, String]|||Java|59| |N/A|[Median of Two Sorted Arrays.java](https://github.com/awangdev/LintCode/blob/master/Java/Median%20of%20Two%20Sorted%20Arrays.java)|Hard|[Array, Binary Search, DFS, Divide and Conquer]|||Java|60| |N/A|[Perfect Squares.java](https://github.com/awangdev/LintCode/blob/master/Java/Perfect%20Squares.java)|Medium|[BFS, DP, Math, Partition DP]|||Java|61| |N/A|[Word Search.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Search.java)|Medium|[Array, Backtracking, DFS]|||Java|62| |N/A|[Backpack II.java](https://github.com/awangdev/LintCode/blob/master/Java/Backpack%20II.java)|Medium|[Backpack DP, DP]|||Java|63| |N/A|[Reshape the Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/Reshape%20the%20Matrix.java)|Easy|[]|||Java|64| |N/A|[Update Bits.java](https://github.com/awangdev/LintCode/blob/master/Java/Update%20Bits.java)|Medium|[Bit Manipulation]|||Java|65| |N/A|[Triangle Count.java](https://github.com/awangdev/LintCode/blob/master/Java/Triangle%20Count.java)|Medium|[Array]|||Java|66| |N/A|[Remove Duplicate Letters.java](https://github.com/awangdev/LintCode/blob/master/Java/Remove%20Duplicate%20Letters.java)|Hard|[Greedy, Hash Table, Stack]|||Java|67| |N/A|[Permutation Sequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Permutation%20Sequence.java)|Medium|[Backtracking, Math]|||Java|68| |N/A|[House Robber II.java](https://github.com/awangdev/LintCode/blob/master/Java/House%20Robber%20II.java)|Medium|[DP, Sequence DP, Status DP]|||Java|69| |N/A|[O(1) Check Power of 2.java](https://github.com/awangdev/LintCode/blob/master/Java/O(1)%20Check%20Power%20of%202.java)|Easy|[Bit Manipulation]|||Java|70| |N/A|[Letter Combinations of a Phone Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Letter%20Combinations%20of%20a%20Phone%20Number.java)|Medium|[Backtracking, String]|||Java|71| |N/A|[Backspace String Compare.java](https://github.com/awangdev/LintCode/blob/master/Java/Backspace%20String%20Compare.java)|Easy|[Stack, Two Pointers]|||Java|72| |N/A|[Minimum Size Subarray Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/Minimum%20Size%20Subarray%20Sum.java)|Medium|[Array, Binary Search, Subarray, Two Pointers]|O(n)|O(1)|Java|73| |N/A|[Implement Stack using Queues.java](https://github.com/awangdev/LintCode/blob/master/Java/Implement%20Stack%20using%20Queues.java)|Easy|[Design, Stack]|||Java|74| |N/A|[Minimum Absolute Difference in BST.java](https://github.com/awangdev/LintCode/blob/master/Java/Minimum%20Absolute%20Difference%20in%20BST.java)|Easy|[BST]|||Java|75| |N/A|[Maximum Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Binary%20Tree.java)|Medium|[Stack, Tree]|||Java|76| |N/A|[ColorGrid.java](https://github.com/awangdev/LintCode/blob/master/Java/ColorGrid.java)|Medium|[Design, Hash Table]|||Java|77| |N/A|[HashWithArray.java](https://github.com/awangdev/LintCode/blob/master/Java/HashWithArray.java)|Easy|[]|||Java|78| |N/A|[Flood Fill.java](https://github.com/awangdev/LintCode/blob/master/Java/Flood%20Fill.java)|Easy|[DFS]|||Java|79| |N/A|[Construct Binary Tree from Inorder and Postorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/Construct%20Binary%20Tree%20from%20Inorder%20and%20Postorder%20Traversal.java)|Medium|[Array, DFS, Divide and Conquer, Tree]|||Java|80| |N/A|[Backpack.java](https://github.com/awangdev/LintCode/blob/master/Java/Backpack.java)|Medium|[Backpack DP, DP]|||Java|81| |N/A|[Longest Common Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Common%20Subsequence.java)|Medium|[DP, Double Sequence DP, Sequence DP]|||Java|82| |N/A|[Peeking Iterator.java](https://github.com/awangdev/LintCode/blob/master/Java/Peeking%20Iterator.java)|Medium|[Design]|||Java|83| |N/A|[Orderly Queue.java](https://github.com/awangdev/LintCode/blob/master/Java/Orderly%20Queue.java)|Hard|[Math, String]|||Java|84| |N/A|[QuickSort.java](https://github.com/awangdev/LintCode/blob/master/Java/QuickSort.java)|Medium|[Quick Sort, Sort]|||Java|85| |N/A|[Maximal Rectangle.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximal%20Rectangle.java)|Hard|[Array, DP, Hash Table, Stack]|||Java|86| |N/A|[Expression Evaluation.java](https://github.com/awangdev/LintCode/blob/master/Java/Expression%20Evaluation.java)|Hard|[Binary Tree, DFS, Expression Tree, Minimum Binary Tree, Stack]|||Java|87| |N/A|[Subtree.java](https://github.com/awangdev/LintCode/blob/master/Java/Subtree.java)|Easy|[DFS, Tree]|||Java|88| |N/A|[LFU Cache.java](https://github.com/awangdev/LintCode/blob/master/Java/LFU%20Cache.java)|Hard|[Design, Hash Table]|||Java|89| |N/A|[Cosine Similarity.java](https://github.com/awangdev/LintCode/blob/master/Java/Cosine%20Similarity.java)|Easy|[Basic Implementation]|||Java|90| |N/A|[Scramble String.java](https://github.com/awangdev/LintCode/blob/master/Java/Scramble%20String.java)|Hard|[DP, Interval DP, String]|||Java|91| |N/A|[Redundant Connection.java](https://github.com/awangdev/LintCode/blob/master/Java/Redundant%20Connection.java)|Medium|[BFS, DFS, Graph, Tree, Union Find]|||Java|92| |N/A|[Rotate List.java](https://github.com/awangdev/LintCode/blob/master/Java/Rotate%20List.java)|Medium|[Linked List, Two Pointers]|||Java|93| |N/A|[Swap Nodes in Pairs.java](https://github.com/awangdev/LintCode/blob/master/Java/Swap%20Nodes%20in%20Pairs.java)|Medium|[Linked List]|||Java|94| |N/A|[Longest Increasing Continuous subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Increasing%20Continuous%20subsequence.java)|Easy|[Array, Coordinate DP, DP]|||Java|95| |N/A|[K Edit Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/K%20Edit%20Distance.java)|Hard|[DP, Double Sequence DP, Sequence DP, Trie]|||Java|96| |N/A|[Combinations.java](https://github.com/awangdev/LintCode/blob/master/Java/Combinations.java)|Medium|[Backtracking, Combination, DFS]|||Java|97| |N/A|[Max Area of Island.java](https://github.com/awangdev/LintCode/blob/master/Java/Max%20Area%20of%20Island.java)|Easy|[Array, DFS]|||Java|98| |N/A|[Sort List.java](https://github.com/awangdev/LintCode/blob/master/Java/Sort%20List.java)|Medium|[Divide and Conquer, Linked List, Merge Sort, Sort]|||Java|99| |N/A|[Find Peak Element.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20Peak%20Element.java)|Medium|[Array, Binary Search]|||Java|100| |N/A|[Word Search II.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Search%20II.java)|Hard|[Backtracking, DFS, Trie]|||Java|101| |N/A|[K Empty Slots.java](https://github.com/awangdev/LintCode/blob/master/Java/K%20Empty%20Slots.java)|Hard|[Array, BST, TreeSet]|||Java|102| |N/A|[Gray Code.java](https://github.com/awangdev/LintCode/blob/master/Java/Gray%20Code.java)|Medium|[Backtracking]|||Java|103| |N/A|[Encode and Decode TinyURL.java](https://github.com/awangdev/LintCode/blob/master/Java/Encode%20and%20Decode%20TinyURL.java)|Medium|[Hash Table, Math]|||Java|104| |N/A|[Game of Life.java](https://github.com/awangdev/LintCode/blob/master/Java/Game%20of%20Life.java)|Medium|[Array]|||Java|105| |N/A|[Compare Version Numbers.java](https://github.com/awangdev/LintCode/blob/master/Java/Compare%20Version%20Numbers.java)|Medium|[String]|||Java|106| |N/A|[Singleton.java](https://github.com/awangdev/LintCode/blob/master/Java/Singleton.java)|Easy|[Design]|||Java|107| |N/A|[Ugly Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Ugly%20Number.java)|Medium|[Math]|||Java|108| |N/A|[Russian Doll Envelopes.java](https://github.com/awangdev/LintCode/blob/master/Java/Russian%20Doll%20Envelopes.java)|Hard|[Binary Search, Coordinate DP, DP]|||Java|109| |N/A|[Rehashing.java](https://github.com/awangdev/LintCode/blob/master/Java/Rehashing.java)|Medium|[Hash Table]|||Java|110| |N/A|[Kth Smallest Sum In Two Sorted Arrays.java](https://github.com/awangdev/LintCode/blob/master/Java/Kth%20Smallest%20Sum%20In%20Two%20Sorted%20Arrays.java)|Hard|[]|||Java|111| |N/A|[Longest Common Substring.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Common%20Substring.java)|Medium|[DP, Double Sequence DP, Sequence DP, String]|||Java|112| |N/A|[Rotate Image.java](https://github.com/awangdev/LintCode/blob/master/Java/Rotate%20Image.java)|Medium|[Array, Enumeration]|||Java|113| |N/A|[Backpack III.java](https://github.com/awangdev/LintCode/blob/master/Java/Backpack%20III.java)|Hard|[Backpack DP, DP]|||Java|114| |N/A|[Combination Sum IV.java](https://github.com/awangdev/LintCode/blob/master/Java/Combination%20Sum%20IV.java)|Medium|[Array, Backpack DP, DP]|||Java|115| |N/A|[Number of Longest Increasing Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Number%20of%20Longest%20Increasing%20Subsequence.java)|Medium|[Coordinate DP, DP]|O(n^2)||Java|116| |N/A|[Permutation Index.java](https://github.com/awangdev/LintCode/blob/master/Java/Permutation%20Index.java)|Easy|[]|||Java|117| |N/A|[4Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/4Sum.java)|Medium|[Hash Table]|||Java|118| |N/A|[Shortest Palindrome.java](https://github.com/awangdev/LintCode/blob/master/Java/Shortest%20Palindrome.java)|Hard|[KMP, String]|||Java|119| |N/A|[Convert Sorted Array to Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Sorted%20Array%20to%20Binary%20Search%20Tree.java)|Easy|[DFS, Divide and Conquer, Tree]|||Java|120| |N/A|[Populating Next Right Pointers in Each Node.java](https://github.com/awangdev/LintCode/blob/master/Java/Populating%20Next%20Right%20Pointers%20in%20Each%20Node.java)|Medium|[DFS, Divide and Conquer, Tree]|||Java|121| |N/A|[Space Replacement.java](https://github.com/awangdev/LintCode/blob/master/Java/Space%20Replacement.java)|Medium|[String]|||Java|122| |N/A|[Contiguous Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Contiguous%20Array.java)|Medium|[Hash Table]|||Java|123| |N/A|[Reverse Linked List II .java](https://github.com/awangdev/LintCode/blob/master/Java/Reverse%20Linked%20List%20II%20.java)|Medium|[Linked List]|||Java|124| |N/A|[Palindrome Pairs.java](https://github.com/awangdev/LintCode/blob/master/Java/Palindrome%20Pairs.java)|Hard|[Hash Table, String, Trie]|||Java|125| |N/A|[Find Peak Element II.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20Peak%20Element%20II.java)|Hard|[Binary Search, DFS, Divide and Conquer]|||Java|126| |N/A|[Minimum Height Trees.java](https://github.com/awangdev/LintCode/blob/master/Java/Minimum%20Height%20Trees.java)|Medium|[BFS, Graph]|||Java|127| |N/A|[Longest Substring Without Repeating Characters.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Substring%20Without%20Repeating%20Characters.java)|Medium|[Hash Table, String, Two Pointers]|||Java|128| |N/A|[Fraction to Recurring Decimal.java](https://github.com/awangdev/LintCode/blob/master/Java/Fraction%20to%20Recurring%20Decimal.java)|Medium|[Hash Table, Math]|||Java|129| |N/A|[Wiggle Sort.java](https://github.com/awangdev/LintCode/blob/master/Java/Wiggle%20Sort.java)|Medium|[Array, Sort]|||Java|130| |N/A|[Reverse Words in a String II.java](https://github.com/awangdev/LintCode/blob/master/Java/Reverse%20Words%20in%20a%20String%20II.java)|Medium|[String]|||Java|131| |N/A|[Remove Node in Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Remove%20Node%20in%20Binary%20Search%20Tree.java)|Hard|[BST]|||Java|132| |N/A|[Reorder List.java](https://github.com/awangdev/LintCode/blob/master/Java/Reorder%20List.java)|Medium|[Linked List]|||Java|133| |N/A|[Redundant Connection II.java](https://github.com/awangdev/LintCode/blob/master/Java/Redundant%20Connection%20II.java)|Hard|[DFS, Graph, Tree, Union Find]|||Java|134| |N/A|[[tool] Quick Select - Median.java](https://github.com/awangdev/LintCode/blob/master/Java/[tool]%20Quick%20Select%20-%20Median.java)|Easy|[Array, Lint, Quick Select, Quick Sort, Two Pointers]|O(n)|O(logN)|Java|135| |N/A|[Swap Bits.java](https://github.com/awangdev/LintCode/blob/master/Java/Swap%20Bits.java)|Easy|[Bit Manipulation]|||Java|136| |N/A|[Friends Of Appropriate Ages.java](https://github.com/awangdev/LintCode/blob/master/Java/Friends%20Of%20Appropriate%20Ages.java)|Medium|[Array, Math]|||Java|137| |N/A|[Longest Increasing Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Increasing%20Subsequence.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](https://github.com/awangdev/LintCode/blob/master/Java/Power%20of%20Two.java)|Easy|[Bit Manipulation, Math]|||Java|139| |N/A|[Min Stack.java](https://github.com/awangdev/LintCode/blob/master/Java/Min%20Stack.java)|Easy|[Design, Stack]|||Java|140| |N/A|[Count of Smaller Number before itself.java](https://github.com/awangdev/LintCode/blob/master/Java/Count%20of%20Smaller%20Number%20before%20itself.java)|Hard|[]|||Java|141| |N/A|[Majority Number III.java](https://github.com/awangdev/LintCode/blob/master/Java/Majority%20Number%20III.java)|Medium|[Hash Table, Linked List]|||Java|142| |N/A|[Number of Digit One.java](https://github.com/awangdev/LintCode/blob/master/Java/Number%20of%20Digit%20One.java)|Hard|[Math]|||Java|143| |N/A|[Tweaked Identical Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Tweaked%20Identical%20Binary%20Tree.java)|Easy|[DFS, Tree]|||Java|144| |N/A|[Search Range in Binary Search Tree .java](https://github.com/awangdev/LintCode/blob/master/Java/Search%20Range%20in%20Binary%20Search%20Tree%20.java)|Medium|[BST, Binary Tree]|||Java|145| |N/A|[Best Time to Buy and Sell Stock III.java](https://github.com/awangdev/LintCode/blob/master/Java/Best%20Time%20to%20Buy%20and%20Sell%20Stock%20III.java)|Hard|[Array, DP, Sequence DP]|||Java|146| |N/A|[Design Search Autocomplete System.java](https://github.com/awangdev/LintCode/blob/master/Java/Design%20Search%20Autocomplete%20System.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`|Java|147| |N/A|[Subsets II.java](https://github.com/awangdev/LintCode/blob/master/Java/Subsets%20II.java)|Medium|[Array, BFS, Backtracking, DFS]|O(2^n)||Java|148| |N/A|[One Edit Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/One%20Edit%20Distance.java)|Medium|[String]|||Java|149| |N/A|[Segment Tree Modify.java](https://github.com/awangdev/LintCode/blob/master/Java/Segment%20Tree%20Modify.java)|Medium|[Binary Tree, DFS, Divide and Conquer, Lint, Segment Tree]|||Java|150| |N/A|[Distinct Subsequences.java](https://github.com/awangdev/LintCode/blob/master/Java/Distinct%20Subsequences.java)|Hard|[DP, String]|||Java|151| |N/A|[Insert Node in a Binary Search Tree .java](https://github.com/awangdev/LintCode/blob/master/Java/Insert%20Node%20in%20a%20Binary%20Search%20Tree%20.java)|Easy|[BST]|||Java|152| |N/A|[Container With Most Water.java](https://github.com/awangdev/LintCode/blob/master/Java/Container%20With%20Most%20Water.java)|Medium|[Array, Two Pointers]|||Java|153| |N/A|[Word Ladder.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Ladder.java)|Medium|[BFS]|||Java|154| |N/A|[Single Number II.java](https://github.com/awangdev/LintCode/blob/master/Java/Single%20Number%20II.java)|Medium|[Bit Manipulation]|||Java|155| |N/A|[Heaters.java](https://github.com/awangdev/LintCode/blob/master/Java/Heaters.java)|Easy|[]|||Java|156| |N/A|[Kth Smallest Element in a BST.java](https://github.com/awangdev/LintCode/blob/master/Java/Kth%20Smallest%20Element%20in%20a%20BST.java)|Medium|[BST, DFS, Stack, Tree]|||Java|157| |N/A|[Robot Room Cleaner.java](https://github.com/awangdev/LintCode/blob/master/Java/Robot%20Room%20Cleaner.java)|Hard|[Backtracking, DFS]|||Java|158| |N/A|[Coins in a Line II.java](https://github.com/awangdev/LintCode/blob/master/Java/Coins%20in%20a%20Line%20II.java)|Medium|[Array, DP, Game Theory, Memoization, MiniMax]|||Java|159| |N/A|[Partition List.java](https://github.com/awangdev/LintCode/blob/master/Java/Partition%20List.java)|Medium|[Linked List, Two Pointers]|||Java|160| |N/A|[Classical Binary Search.java](https://github.com/awangdev/LintCode/blob/master/Java/Classical%20Binary%20Search.java)|Easy|[Binary Search]|||Java|161| |N/A|[Wood Cut.java](https://github.com/awangdev/LintCode/blob/master/Java/Wood%20Cut.java)|Medium|[Binary Search]|||Java|162| |N/A|[Connecting Graph III.java](https://github.com/awangdev/LintCode/blob/master/Java/Connecting%20Graph%20III.java)|Medium|[Union Find]|||Java|163| |N/A|[Invert Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Invert%20Binary%20Tree.java)|Easy|[BFS, DFS, Tree]|||Java|164| |N/A|[Remove Duplicates from Unsorted List.java](https://github.com/awangdev/LintCode/blob/master/Java/Remove%20Duplicates%20from%20Unsorted%20List.java)|Medium|[Linked List]|||Java|165| |N/A|[Maximum Size Subarray Sum Equals k.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Size%20Subarray%20Sum%20Equals%20k.java)|Medium|[Hash Table, PreSum, Subarray]|O(n)|O(n)|Java|166| |N/A|[The Smallest Difference.java](https://github.com/awangdev/LintCode/blob/master/Java/The%20Smallest%20Difference.java)|Medium|[Array, Sort, Two Pointers]|||Java|167| |N/A|[Unique Binary Search Tree II.java](https://github.com/awangdev/LintCode/blob/master/Java/Unique%20Binary%20Search%20Tree%20II.java)|Medium|[BST, DP, Divide and Conquer, Tree]|||Java|168| |N/A|[Encode and Decode Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/Encode%20and%20Decode%20Strings.java)|Medium|[String]|||Java|169| |N/A|[Remove Duplicates from Sorted List II.java](https://github.com/awangdev/LintCode/blob/master/Java/Remove%20Duplicates%20from%20Sorted%20List%20II.java)|Medium|[Linked List]|||Java|170| |N/A|[Subarray Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/Subarray%20Sum%20II.java)|Hard|[Array, Binary Search, Two Pointers]|||Java|171| |N/A|[Matrix Zigzag Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/Matrix%20Zigzag%20Traversal.java)|Easy|[]|||Java|172| |N/A|[Ones and Zeroes.java](https://github.com/awangdev/LintCode/blob/master/Java/Ones%20and%20Zeroes.java)|Hard|[DP]|||Java|173| |N/A|[Number of Connected Components in an Undirected Graph.java](https://github.com/awangdev/LintCode/blob/master/Java/Number%20of%20Connected%20Components%20in%20an%20Undirected%20Graph.java)|Medium|[BFS, DFS, Graph, Union Find]|||Java|174| |N/A|[Submatrix Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/Submatrix%20Sum.java)|Medium|[Array, Hash Table, PreSum]|||Java|175| |N/A|[Zigzag Iterator.java](https://github.com/awangdev/LintCode/blob/master/Java/Zigzag%20Iterator.java)|Medium|[BST]|||Java|176| |N/A|[Find the Connected Component in the Undirected Graph.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20the%20Connected%20Component%20in%20the%20Undirected%20Graph.java)|Medium|[BFS, DFS]|||Java|177| |N/A|[Implement Stack.java](https://github.com/awangdev/LintCode/blob/master/Java/Implement%20Stack.java)|Easy|[Stack]|||Java|178| |N/A|[Number of Airplane in the sky.java](https://github.com/awangdev/LintCode/blob/master/Java/Number%20of%20Airplane%20in%20the%20sky.java)|Medium|[Array, Interval, PriorityQueue, Sort, Sweep Line]|||Java|179| |N/A|[Surrounded Regions.java](https://github.com/awangdev/LintCode/blob/master/Java/Surrounded%20Regions.java)|Medium|[BFS, DFS, Matrix DFS, Union Find]|||Java|180| |N/A|[Wildcard Matching.java](https://github.com/awangdev/LintCode/blob/master/Java/Wildcard%20Matching.java)|Hard|[Backtracking, DP, Double Sequence DP, Greedy, Sequence DP, String]|||Java|181| |N/A|[Expression Add Operators.java](https://github.com/awangdev/LintCode/blob/master/Java/Expression%20Add%20Operators.java)|Hard|[Backtracking, DFS, Divide and Conquer, String]|O(4^n)|O(4^n)|Java|182| |N/A|[Cracking the Safe.java](https://github.com/awangdev/LintCode/blob/master/Java/Cracking%20the%20Safe.java)|Hard|[DFS, Greedy, Math]|||Java|183| |N/A|[Unique Word Abbreviation.java](https://github.com/awangdev/LintCode/blob/master/Java/Unique%20Word%20Abbreviation.java)|Medium|[Design, Hash Table]|||Java|184| |N/A|[Best Time to Buy and Sell Stock IV.java](https://github.com/awangdev/LintCode/blob/master/Java/Best%20Time%20to%20Buy%20and%20Sell%20Stock%20IV.java)|Hard|[DP, Sequence DP]|||Java|185| |N/A|[Find Minimum in Rotated Sorted Array II.java](https://github.com/awangdev/LintCode/blob/master/Java/Find%20Minimum%20in%20Rotated%20Sorted%20Array%20II.java)|Hard|[Array, Binary Search]|||Java|186| |N/A|[Longest Valid Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Valid%20Parentheses.java)|Hard|[Coordinate DP, Stack, String]|||Java|187| |N/A|[Ugly Number II.java](https://github.com/awangdev/LintCode/blob/master/Java/Ugly%20Number%20II.java)|Medium|[DP, Enumeration, Heap, Math, PriorityQueue]|O(n)|O(n)|Java|188| |N/A|[Add Two Numbers II.java](https://github.com/awangdev/LintCode/blob/master/Java/Add%20Two%20Numbers%20II.java)|Medium|[Linked List]|||Java|189| |N/A|[Maximum Average Subarray II.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Average%20Subarray%20II.java)|Review|[Array, Binary Search, PreSum]|||Java|190| |N/A|[Expression Tree Build.java](https://github.com/awangdev/LintCode/blob/master/Java/Expression%20Tree%20Build.java)|Hard|[Binary Tree, Expression Tree, Minimum Binary Tree, Stack]|||Java|191| |N/A|[Merge Two Binary Trees.java](https://github.com/awangdev/LintCode/blob/master/Java/Merge%20Two%20Binary%20Trees.java)|Easy|[DFS, Tree]|||Java|192| |N/A|[Copy Books.java](https://github.com/awangdev/LintCode/blob/master/Java/Copy%20Books.java)|Hard|[Binary Search, DP, Partition DP]|||Java|193| |N/A|[Power of Three.java](https://github.com/awangdev/LintCode/blob/master/Java/Power%20of%20Three.java)|Easy|[Math]|||Java|194| |N/A|[Sort Colors II.java](https://github.com/awangdev/LintCode/blob/master/Java/Sort%20Colors%20II.java)|Medium|[Partition, Quick Sort, Sort, Two Pointers]|||Java|195| |N/A|[Maximum Subarray III.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Subarray%20III.java)|Review|[]|||Java|196| |N/A|[Path Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/Path%20Sum%20II.java)|Easy|[Backtracking, DFS, Tree]|||Java|197| |N/A|[Segment Tree Query II.java](https://github.com/awangdev/LintCode/blob/master/Java/Segment%20Tree%20Query%20II.java)|Medium|[Binary Tree, DFS, Divide and Conquer, Lint, Segment Tree]|||Java|198| |N/A|[Shortest Distance from All Buildings.java](https://github.com/awangdev/LintCode/blob/master/Java/Shortest%20Distance%20from%20All%20Buildings.java)|Hard|[BFS]|||Java|199| |N/A|[Brick Wall.java](https://github.com/awangdev/LintCode/blob/master/Java/Brick%20Wall.java)|Medium|[Hash Table]|O(mn)|O(X), X = max wall width|Java|200| |N/A|[Longest Increasing Path in a Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Increasing%20Path%20in%20a%20Matrix.java)|Hard|[Coordinate DP, DFS, DP, Memoization, Topological Sort]|||Java|201| |N/A|[Interleaving String.java](https://github.com/awangdev/LintCode/blob/master/Java/Interleaving%20String.java)|Hard|[DP, String]|||Java|202| |N/A|[Shuffle an Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Shuffle%20an%20Array.java)|Medium|[Permutation]|||Java|203| |N/A|[Recover Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Recover%20Binary%20Search%20Tree.java)|Hard|[BST, DFS, Tree]|||Java|204| |N/A|[My Calendar I.java](https://github.com/awangdev/LintCode/blob/master/Java/My%20Calendar%20I.java)|Medium|[Array, TreeMap]|||Java|205| |N/A|[Evaluate Reverse Polish Notation.java](https://github.com/awangdev/LintCode/blob/master/Java/Evaluate%20Reverse%20Polish%20Notation.java)|Medium|[Stack]|O(n)|O(n)|Java|206| |N/A|[Counting Bits.java](https://github.com/awangdev/LintCode/blob/master/Java/Counting%20Bits.java)|Medium|[Bit Manipulation, Bitwise DP, DP]|||Java|207| |N/A|[Sort Letters by Case.java](https://github.com/awangdev/LintCode/blob/master/Java/Sort%20Letters%20by%20Case.java)|Medium|[Partition, Sort, String, Two Pointers]|||Java|208| |N/A|[Two Strings Are Anagrams.java](https://github.com/awangdev/LintCode/blob/master/Java/Two%20Strings%20Are%20Anagrams.java)|Easy|[]|||Java|209| |N/A|[Two Sum II - Input array is sorted.java](https://github.com/awangdev/LintCode/blob/master/Java/Two%20Sum%20II%20-%20Input%20array%20is%20sorted.java)|Medium|[Array, Binary Search, Two Pointers]|||Java|210| |N/A|[[HackerRank]. Change to Anagram.java](https://github.com/awangdev/LintCode/blob/master/Java/[HackerRank].%20Change%20to%20Anagram.java)|Easy|[String]|||Java|211| |N/A|[Implement Queue using Stacks.java](https://github.com/awangdev/LintCode/blob/master/Java/Implement%20Queue%20using%20Stacks.java)|Easy|[Design, Stack]|||Java|212| |N/A|[Basic Calculator.java](https://github.com/awangdev/LintCode/blob/master/Java/Basic%20Calculator.java)|Hard|[Binary Tree, Expression Tree, Math, Minimum Binary Tree, Stack]|||Java|213| |N/A|[Word Squares.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Squares.java)|Hard|[Backtracking, Trie]|||Java|214| |N/A|[Insertion Sort List.java](https://github.com/awangdev/LintCode/blob/master/Java/Insertion%20Sort%20List.java)|Medium|[Linked List, Sort]|||Java|215| |N/A|[Interval Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/Interval%20Sum.java)|Medium|[Binary Search, Lint, Segment Tree]|||Java|216| |N/A|[Strobogrammatic Number II.java](https://github.com/awangdev/LintCode/blob/master/Java/Strobogrammatic%20Number%20II.java)|Medium|[DFS, Enumeration, Math, Sequence DFS]|||Java|217| |N/A|[The Maze II.java](https://github.com/awangdev/LintCode/blob/master/Java/The%20Maze%20II.java)|Medium|[BFS, DFS, PriorityQueue]|||Java|218| |N/A|[k Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/k%20Sum.java)|Hard|[DP]|||Java|219| |N/A|[Coins in a Line III.java](https://github.com/awangdev/LintCode/blob/master/Java/Coins%20in%20a%20Line%20III.java)|Hard|[Array, DP, Game Theory, Interval DP, Memoization]|||Java|220| |N/A|[Convert Sorted List to Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Sorted%20List%20to%20Binary%20Search%20Tree.java)|Medium|[BST, DFS, Divide and Conquer, Linked List]|||Java|221| |N/A|[Guess Number Higher or Lower.java](https://github.com/awangdev/LintCode/blob/master/Java/Guess%20Number%20Higher%20or%20Lower.java)|Easy|[Binary Search]|||Java|222| |N/A|[Trapping Rain Water II.java](https://github.com/awangdev/LintCode/blob/master/Java/Trapping%20Rain%20Water%20II.java)|Hard|[BFS, Heap, MinHeap, PriorityQueue]|||Java|223| |N/A|[Bricks Falling When Hit.java](https://github.com/awangdev/LintCode/blob/master/Java/Bricks%20Falling%20When%20Hit.java)|Hard|[Union Find]|||Java|224| |N/A|[Subarray Sum Closest.java](https://github.com/awangdev/LintCode/blob/master/Java/Subarray%20Sum%20Closest.java)|Medium|[PreSum, PriorityQueue, Sort, Subarray]|O(nlogn)|O(n)|Java|225| |N/A|[Burst Balloons.java](https://github.com/awangdev/LintCode/blob/master/Java/Burst%20Balloons.java)|Hard|[DP, Divide and Conquer, Interval DP, Memoization]|||Java|226| |N/A|[Partition Array by Odd and Even.java](https://github.com/awangdev/LintCode/blob/master/Java/Partition%20Array%20by%20Odd%20and%20Even.java)|Easy|[Array, Two Pointers]|||Java|227| |N/A|[Best Time to Buy and Sell Stock with Cooldown.java](https://github.com/awangdev/LintCode/blob/master/Java/Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Cooldown.java)|Medium|[DP]|||Java|228| |N/A|[Palindrome Partitioning II.java](https://github.com/awangdev/LintCode/blob/master/Java/Palindrome%20Partitioning%20II.java)|Hard|[DP, Partition DP]|||Java|229| |N/A|[Convert Binary Search Tree to Sorted Doubly Linked List (extra space).java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Binary%20Search%20Tree%20to%20Sorted%20Doubly%20Linked%20List%20(extra%20space).java)|Medium|[Linked List, Stack, Tree]|O(n)|O(n)|Java|230| |N/A|[Kth Largest Element in an Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Kth%20Largest%20Element%20in%20an%20Array.java)|Medium|[Divide and Conquer, Heap, MinHeap, PriorityQueue, Quick Sort]|||Java|231| |N/A|[Sliding Puzzle.java](https://github.com/awangdev/LintCode/blob/master/Java/Sliding%20Puzzle.java)|Hard|[BFS, Graph]|||Java|232| |N/A|[Interval Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/Interval%20Sum%20II.java)|Hard|[Binary Search, Lint, Segment Tree]|||Java|233| |N/A|[Add Digits.java](https://github.com/awangdev/LintCode/blob/master/Java/Add%20Digits.java)|Easy|[Math]|||Java|234| |N/A|[HashWithCustomizedClass(LinkedList).java](https://github.com/awangdev/LintCode/blob/master/Java/HashWithCustomizedClass(LinkedList).java)|Medium|[Hash Table]|||Java|235| |N/A|[Maximum Vacation Days.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Vacation%20Days.java)|Hard|[DP]|||Java|236| |N/A|[Smallest Subtree with all the Deepest Nodes.java](https://github.com/awangdev/LintCode/blob/master/Java/Smallest%20Subtree%20with%20all%20the%20Deepest%20Nodes.java)|Medium|[DFS, Divide and Conquer, Tree]|O(n)|O(n)|Java|237| |N/A|[Kth Smallest Element in a Sorted Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/Kth%20Smallest%20Element%20in%20a%20Sorted%20Matrix.java)|Medium|[Binary Search, Heap]|O(n + klogn)|O(n)|Java|238| |N/A|[Combination Sum III.java](https://github.com/awangdev/LintCode/blob/master/Java/Combination%20Sum%20III.java)|Medium|[Array, Backtracking, Combination, DFS]|||Java|239| |N/A|[Last Position of Target.java](https://github.com/awangdev/LintCode/blob/master/Java/Last%20Position%20of%20Target.java)|Easy|[Binary Search]|||Java|240| |N/A|[Path Sum III.java](https://github.com/awangdev/LintCode/blob/master/Java/Path%20Sum%20III.java)|Easy|[DFS, Double Recursive, Tree]|||Java|241| |N/A|[Convert Expression to Reverse Polish Notation.java](https://github.com/awangdev/LintCode/blob/master/Java/Convert%20Expression%20to%20Reverse%20Polish%20Notation.java)|Hard|[Binary Tree, DFS, Expression Tree, Stack]|||Java|242| |N/A|[Complete Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Complete%20Binary%20Tree.java)|Easy|[BFS, Tree]|||Java|243| |N/A|[Best Time to Buy and Sell Stock with Transaction Fee.java](https://github.com/awangdev/LintCode/blob/master/Java/Best%20Time%20to%20Buy%20and%20Sell%20Stock%20with%20Transaction%20Fee.java)|Medium|[Array, DP, Greedy, Sequence DP, Status DP]|O(n)|O(n), O(1) rolling array|Java|244| |N/A|[Pow(x, n).java](https://github.com/awangdev/LintCode/blob/master/Java/Pow(x,%20n).java)|Medium|[Binary Search, Math]|||Java|245| |N/A|[Maximum Subarray II.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20Subarray%20II.java)|Medium|[Array, DP, Greedy, PreSum, Sequence DP, Subarray]|||Java|246| |N/A|[Sort Colors.java](https://github.com/awangdev/LintCode/blob/master/Java/Sort%20Colors.java)|Medium|[Array, Partition, Quick Sort, Sort, Two Pointers]|||Java|247| |N/A|[Word Ladder II.java](https://github.com/awangdev/LintCode/blob/master/Java/Word%20Ladder%20II.java)|Hard|[Array, BFS, Backtracking, DFS, Hash Table, String]|||Java|248| |N/A|[Sum of Two Integers.java](https://github.com/awangdev/LintCode/blob/master/Java/Sum%20of%20Two%20Integers.java)|Easy|[Bit Manipulation]|||Java|249| |N/A|[Predict the Winner.java](https://github.com/awangdev/LintCode/blob/master/Java/Predict%20the%20Winner.java)|Medium|[DP, MiniMax]|||Java|250| |N/A|[Connecting Graph II.java](https://github.com/awangdev/LintCode/blob/master/Java/Connecting%20Graph%20II.java)|Medium|[Union Find]|||Java|251| |N/A|[Search Insert Position.java](https://github.com/awangdev/LintCode/blob/master/Java/Search%20Insert%20Position.java)|Easy|[]|||Java|252| |N/A|[Longest Univalue Path.java](https://github.com/awangdev/LintCode/blob/master/Java/Longest%20Univalue%20Path.java)|Easy|[]|||Java|253| |N/A|[Contains Duplicate III.java](https://github.com/awangdev/LintCode/blob/master/Java/Contains%20Duplicate%20III.java)|Medium|[BST]|||Java|254| |N/A|[Spiral Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/Spiral%20Matrix.java)|Medium|[Array, Enumeration]|||Java|255| |N/A|[Next Closest Time.java](https://github.com/awangdev/LintCode/blob/master/Java/Next%20Closest%20Time.java)|Medium|[Basic Implementation, Enumeration, String]|||Java|256| |N/A|[Group Shifted Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/Group%20Shifted%20Strings.java)|Medium|[Hash Table, String]|||Java|257| |N/A|[The Maze III.java](https://github.com/awangdev/LintCode/blob/master/Java/The%20Maze%20III.java)|Hard|[BFS, DFS, PriorityQueue]|||Java|258| |N/A|[Coins in a Line.java](https://github.com/awangdev/LintCode/blob/master/Java/Coins%20in%20a%20Line.java)|Medium|[DP, Game Theory, Greedy]|||Java|259| |N/A|[Binary Tree Longest Consecutive Sequence.java](https://github.com/awangdev/LintCode/blob/master/Java/Binary%20Tree%20Longest%20Consecutive%20Sequence.java)|Medium|[DFS, Divide and Conquer, Tree]|||Java|260| |N/A|[The Spiral Matrix II.java](https://github.com/awangdev/LintCode/blob/master/Java/The%20Spiral%20Matrix%20II.java)|Medium|[Array]|||Java|261| |N/A|[Trim a Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/Trim%20a%20Binary%20Search%20Tree.java)|Easy|[BST, Tree]|||Java|262| |N/A|[Number Of Corner Rectangles.java](https://github.com/awangdev/LintCode/blob/master/Java/Number%20Of%20Corner%20Rectangles.java)|Medium|[DP, Math]|||Java|263| |N/A|[Queue Reconstruction by Height.java](https://github.com/awangdev/LintCode/blob/master/Java/Queue%20Reconstruction%20by%20Height.java)|Medium|[Greedy]|||Java|264| |N/A|[Minimum Swaps To Make Sequences Increasing.java](https://github.com/awangdev/LintCode/blob/master/Java/Minimum%20Swaps%20To%20Make%20Sequences%20Increasing.java)|Medium|[Coordinate DP, DP, Status DP]|||Java|265| |N/A|[Interleaving Positive and Negative Numbers.java](https://github.com/awangdev/LintCode/blob/master/Java/Interleaving%20Positive%20and%20Negative%20Numbers.java)|Medium|[Two Pointers]|||Java|266| |N/A|[Path Sum IV.java](https://github.com/awangdev/LintCode/blob/master/Java/Path%20Sum%20IV.java)|Medium|[DFS, Hash Table, Tree]|||Java|267| |N/A|[Excel Sheet Column Number.java](https://github.com/awangdev/LintCode/blob/master/Java/Excel%20Sheet%20Column%20Number.java)|Easy|[Math]|||Java|268| |N/A|[Target Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/Target%20Sum.java)|Medium|[DFS, DP]|||Java|269| |N/A|[Partition Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Partition%20Array.java)|Medium|[Array, Quick Sort, Sort, Two Pointers]|||Java|270| |N/A|[Bus Routes.java](https://github.com/awangdev/LintCode/blob/master/Java/Bus%20Routes.java)|Hard|[BFS]|||Java|271| |N/A|[Max Sum of Rectangle No Larger Than K.java](https://github.com/awangdev/LintCode/blob/master/Java/Max%20Sum%20of%20Rectangle%20No%20Larger%20Than%20K.java)|Hard|[Array, BST, Binary Search, DP, Queue, TreeSet]|||Java|272| |N/A|[String Permutation.java](https://github.com/awangdev/LintCode/blob/master/Java/String%20Permutation.java)|Easy|[]|||Java|273| |N/A|[Maximum XOR of Two Numbers in an Array.java](https://github.com/awangdev/LintCode/blob/master/Java/Maximum%20XOR%20of%20Two%20Numbers%20in%20an%20Array.java)|Medium|[Bit Manipulation, Trie]|||Java|274| |N/A|[Search for a Range.java](https://github.com/awangdev/LintCode/blob/master/Java/Search%20for%20a%20Range.java)|Medium|[Array, Binary Search]|||Java|275| |N/A|[Palindrome Permutation II.java](https://github.com/awangdev/LintCode/blob/master/Java/Palindrome%20Permutation%20II.java)|Medium|[Backtracking, Permutation]|||Java|276| |N/A|[Populating Next Right Pointers in Each Node II.java](https://github.com/awangdev/LintCode/blob/master/Java/Populating%20Next%20Right%20Pointers%20in%20Each%20Node%20II.java)|Medium|[DFS, Tree]|O(n)|O(1)|Java|277| |N/A|[Nim Game.java](https://github.com/awangdev/LintCode/blob/master/Java/Nim%20Game.java)|Easy|[Brainteaser, DP, Game Theory]|||Java|278| |N/A|[Search a 2D Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/Search%20a%202D%20Matrix.java)|Medium|[Array, Binary Search]|||Java|279| |N/A|[Largest Rectangle in Histogram.java](https://github.com/awangdev/LintCode/blob/master/Java/Largest%20Rectangle%20in%20Histogram.java)|Hard|[Array, Monotonous Stack, Stack]|||Java|280| |[lint]|[[lint]. Merge k Sorted Arrays.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Merge%20k%20Sorted%20Arrays.java)|Medium|[Heap, MinHeap, PriorityQueue]|O(nlogk)|O(k)|Java|281| |[lint]|[[lint]. Segment Tree Build II.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Segment%20Tree%20Build%20II.java)|Medium|[Binary Tree, Divide and Conquer, Lint, Segment Tree]|||Java|282| |[lint]|[[lint]. Nth to Last Node in List.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Nth%20to%20Last%20Node%20in%20List.java)|Easy|[Linked List, Lint]|||Java|283| |[lint]|[[lint]. Product of Array Exclude Itself.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Product%20of%20Array%20Exclude%20Itself.java)|Medium|[Array, Lint]|||Java|284| |[lint]|[[lint]. Compare Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Compare%20Strings.java)|Easy|[Lint, String]|||Java|285| |[lint]|[[lint]. Segment Tree Query.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Segment%20Tree%20Query.java)|Medium|[Binary Tree, DFS, Divide and Conquer, Lint, Segment Tree]|||Java|286| |[lint]|[[lint]. HashHeap.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20HashHeap.java)|Hard|[HashHeap, Heap, Lint]|||Java|287| |[lint]|[[lint]. Longest Words.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Longest%20Words.java)|Easy|[Hash Table, Lint, String]|||Java|288| |[lint]|[[lint]. Anagrams.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Anagrams.java)|Medium|[Array, Hash Table, Lint]|O(n)|O(n)|Java|289| |[lint]|[[lint]. 3 Sum Closest.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%203%20Sum%20Closest.java)|Medium|[Array, Lint, Two Pointers]|||Java|290| |[lint]|[[lint]. Unique Characters.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Unique%20Characters.java)|Easy|[Array, Lint, String]|||Java|291| |[lint]|[[lint]. Lowest Common Ancestor II.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Lowest%20Common%20Ancestor%20II.java)|Easy|[Hash Table, Lint, Tree]|||Java|292| |[lint]|[[lint]. Heapify.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Heapify.java)|Medium|[HashHeap, Heap, Lint, MinHeap]|||Java|293| |[lint]|[[lint]. Subarray Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Subarray%20Sum.java)|Easy|[Array, Hash Table, Lint, PreSum, Subarray]|O(n)|O(n)|Java|294| |[lint]|[[lint]. Recover Rotated Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Recover%20Rotated%20Sorted%20Array.java)|Easy|[Array, Lint]|||Java|295| |[lint]|[[lint]. 2 Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%202%20Sum%20II.java)|Medium|[Array, Binary Search, Lint, Two Pointers]|||Java|296| |[lint]|[[lint]. Segment Tree Build.java](https://github.com/awangdev/LintCode/blob/master/Java/[lint].%20Segment%20Tree%20Build.java)|Medium|[Binary Tree, Divide and Conquer, Lint, Segment Tree]|||Java|297| |[tool]|[[tool]. MergeSort.java](https://github.com/awangdev/LintCode/blob/master/Java/[tool].%20MergeSort.java)|Medium|[Lint, Merge Sort, Sort]|O(mlogn)|O(n)|Java|298| |[tool]|[[tool]. Hash Function.java](https://github.com/awangdev/LintCode/blob/master/Java/[tool].%20Hash%20Function.java)|Easy|[Hash Table, Lint]|O(1) get|O(n) store map|Java|299| |[tool]|[[tool]. UnionFind.java](https://github.com/awangdev/LintCode/blob/master/Java/[tool].%20UnionFind.java)|Medium|[Lint, Union Find]|O(n), with Path Compression O(mN), with Union by Rank O(logN)|O(n)|Java|300| |[tool]|[[tool]. Topological Sorting.java](https://github.com/awangdev/LintCode/blob/master/Java/[tool].%20Topological%20Sorting.java)|Medium|[BFS, DFS, Lint, Topological Sort]|O(V + E)|O(V + E)|Java|301| |36|[36. Valid Sudoku.java](https://github.com/awangdev/LintCode/blob/master/Java/36.%20Valid%20Sudoku.java)|Easy|[Enumeration, Hash Table]|(mn)|(mn)|Java|302| |359|[359. Logger Rate Limiter.java](https://github.com/awangdev/LintCode/blob/master/Java/359.%20Logger%20Rate%20Limiter.java)|Easy|[Design, Hash Table]|O(1)|O(n)|Java|303| |198|[198. House Robber.java](https://github.com/awangdev/LintCode/blob/master/Java/198.%20House%20Robber.java)|Easy|[DP, Sequence DP, Status DP]|O(n)|O(n) or rolling array O(1)|Java|304| |21|[21. Merge Two Sorted Lists.java](https://github.com/awangdev/LintCode/blob/master/Java/21.%20Merge%20Two%20Sorted%20Lists.java)|Easy|[Linked List]|O(n)|O(1)|Java|305| |102|[102. Binary Tree Level Order Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/102.%20Binary%20Tree%20Level%20Order%20Traversal.java)|Medium|[BFS, DFS, Tree]|O(n)|O(n)|Java|306| |788|[788. Rotated Digits.java](https://github.com/awangdev/LintCode/blob/master/Java/788.%20Rotated%20Digits.java)|Easy|[Basic Implementation, String]|O(n)|O(n)|Java|307| |42|[42. Trapping Rain Water.java](https://github.com/awangdev/LintCode/blob/master/Java/42.%20Trapping%20Rain%20Water.java)|Hard|[Array, Stack, Two Pointers]|O(n)|O(1)|Java|308| |347|[347. Top K Frequent Elements.java](https://github.com/awangdev/LintCode/blob/master/Java/347.%20Top%20K%20Frequent%20Elements.java)|Medium|[Hash Table, Heap, MaxHeap, MinHeap, PriorityQueue]|O(n)|O(n)|Java|309| |269|[269. Alien Dictionary.java](https://github.com/awangdev/LintCode/blob/master/Java/269.%20Alien%20Dictionary.java)|Hard|[BFS, Backtracking, DFS, Graph, Topological Sort]|O(n), n = # of graph edges|O(n)|Java|310| |237|[237. Delete Node in a Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/237.%20Delete%20Node%20in%20a%20Linked%20List.java)|Easy|[Linked List]|||Java|311| |142|[142. Linked List Cycle II.java](https://github.com/awangdev/LintCode/blob/master/Java/142.%20Linked%20List%20Cycle%20II.java)|Medium|[Cycle Detection, Linked List, Slow Fast Pointer, Two Pointers]|O(n)|O(1)|Java|312| |448|[448. Find All Numbers Disappeared in an Array.java](https://github.com/awangdev/LintCode/blob/master/Java/448.%20Find%20All%20Numbers%20Disappeared%20in%20an%20Array.java)|Easy|[Array, Bucket Sort]|O(n)|O(1)|Java|313| |360|[360. Sort Transformed Array.java](https://github.com/awangdev/LintCode/blob/master/Java/360.%20Sort%20Transformed%20Array.java)|Medium|[Math, Two Pointers]|O(n)|O(n) store result|Java|314| |22|[22. Generate Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/22.%20Generate%20Parentheses.java)|Medium|[Backtracking, DFS, Sequence DFS, String]|O(2^n)|O(2^n)|Java|315| |849|[849. Maximize Distance to Closest Person.java](https://github.com/awangdev/LintCode/blob/master/Java/849.%20Maximize%20Distance%20to%20Closest%20Person.java)|Easy|[Array, Basic Implementation, Two Pointers]|O(n)|O(1)|Java|316| |408|[408. Valid Word Abbreviation.java](https://github.com/awangdev/LintCode/blob/master/Java/408.%20Valid%20Word%20Abbreviation.java)|Easy|[Basic Implementation, String]|||Java|317| |415|[415. Add Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/415.%20Add%20Strings.java)|Easy|[Basic Implementation, Math, String]|O(n)|O(n)|Java|318| |83|[83. Remove Duplicates from Sorted List.java](https://github.com/awangdev/LintCode/blob/master/Java/83.%20Remove%20Duplicates%20from%20Sorted%20List.java)|Easy|[Linked List]|||Java|319| |1108|[1108. Defanging an IP Address.java](https://github.com/awangdev/LintCode/blob/master/Java/1108.%20Defanging%20an%20IP%20Address.java)|Easy|[Basic Implementation, String]|||Java|320| |1021|[1021. Remove Outermost Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/1021.%20Remove%20Outermost%20Parentheses.java)|Easy|[Stack]|||Java|321| |236|[236. Lowest Common Ancestor of a Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/236.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Tree.java)|Medium|[DFS, Tree]|O(n)|O(n)|Java|322| |766|[766. Toeplitz Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/766.%20Toeplitz%20Matrix.java)|Easy|[Array]|O(mn)|O(1)|Java|323| |953|[953. Verifying an Alien Dictionary.java](https://github.com/awangdev/LintCode/blob/master/Java/953.%20Verifying%20an%20Alien%20Dictionary.java)|Easy|[Hash Table]|O(nm)|O(1)|Java|324| |1053|[1053. Previous Permutation With One Swap.java](https://github.com/awangdev/LintCode/blob/master/Java/1053.%20Previous%20Permutation%20With%20One%20Swap.java)|Medium|[Array, Greedy, Permutation]|O(n)|O(1)|Java|325| |1213|[1213. Intersection of Three Sorted Arrays.java](https://github.com/awangdev/LintCode/blob/master/Java/1213.%20Intersection%20of%20Three%20Sorted%20Arrays.java)|Easy|[Hash Table, Two Pointers]|O(m + n + h) two pointers approach|O(1)|Java|326| |383|[383. Ransom Note.java](https://github.com/awangdev/LintCode/blob/master/Java/383.%20Ransom%20Note.java)|Easy|[Basic Implementation, String]|||Java|327| |56|[56. Merge Intervals.java](https://github.com/awangdev/LintCode/blob/master/Java/56.%20Merge%20Intervals.java)|Medium|[Array, PriorityQueue, Sort, Sweep Line]|O(nlogn)|O(n)|Java|328| |252|[252. Meeting Rooms.java](https://github.com/awangdev/LintCode/blob/master/Java/252.%20Meeting%20Rooms.java)|Easy|[PriorityQueue, Sort, Sweep Line]|O(nlogn)|O(1)|Java|329| |665|[665. Non-decreasing Array.java](https://github.com/awangdev/LintCode/blob/master/Java/665.%20Non-decreasing%20Array.java)|Easy|[Array]|O(n)|O(1)|Java|330| |843|[843. Guess the Word.java](https://github.com/awangdev/LintCode/blob/master/Java/843.%20Guess%20the%20Word.java)|Hard|[MiniMax]|TODO|TODO|Java|331| |986|[986. Interval List Intersections.java](https://github.com/awangdev/LintCode/blob/master/Java/986.%20Interval%20List%20Intersections.java)|Medium|[Two Pointers]|O(n)|O(1)|Java|332| |76|[76. Minimum Window Substring.java](https://github.com/awangdev/LintCode/blob/master/Java/76.%20Minimum%20Window%20Substring.java)|Hard|[Hash Table, Sliding Window, String, Two Pointers]|O(n)|O(1)|Java|333| |293|[293. Flip Game.java](https://github.com/awangdev/LintCode/blob/master/Java/293.%20Flip%20Game.java)|Easy|[String]|||Java|334| |244|[244. Shortest Word Distance II.java](https://github.com/awangdev/LintCode/blob/master/Java/244.%20Shortest%20Word%20Distance%20II.java)|Medium|[Array, Design, Hash Table, Two Pointers]|O(n) to build map, O(a + b) to query|O(n)|Java|335| |686|[686. Repeated String Match.java](https://github.com/awangdev/LintCode/blob/master/Java/686.%20Repeated%20String%20Match.java)|Easy|[Basic Implementation, Edge Case, String]|||Java|336| |80|[80.Remove Duplicates from Sorted Array II.java](https://github.com/awangdev/LintCode/blob/master/Java/80.Remove%20Duplicates%20from%20Sorted%20Array%20II.java)|Medium|[Array, Two Pointers]|||Java|337| |301|[301. Remove Invalid Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/301.%20Remove%20Invalid%20Parentheses.java)|Hard|[BFS, DFS, DP]|||Java|338| |111|[111. Minimum Depth of Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/111.%20Minimum%20Depth%20of%20Binary%20Tree.java)|Easy|[BFS, DFS, Tree]|O(n)|O(n)|Java|339| |1216|[1216. Valid Palindrome III.java](https://github.com/awangdev/LintCode/blob/master/Java/1216.%20Valid%20Palindrome%20III.java)|Hard|[DFS, DP, Memoization, String]|O(n^2)|O(n^2)|Java|340| |7|[7. Reverse Integer.java](https://github.com/awangdev/LintCode/blob/master/Java/7.%20Reverse%20Integer.java)|Easy|[Math]|O(n)|O(1)|Java|341| |5|[5. Longest Palindromic Substring.java](https://github.com/awangdev/LintCode/blob/master/Java/5.%20Longest%20Palindromic%20Substring.java)|Medium|[DP, String]|O(n^2)|O(n^2)|Java|342| |303|[303. Range Sum Query - Immutable.java](https://github.com/awangdev/LintCode/blob/master/Java/303.%20Range%20Sum%20Query%20-%20Immutable.java)|Easy|[DP, PreSum]|O(1) query, O(n) setup|O(n)|Java|343| |674|[674. Longest Continuous Increasing Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/674.%20Longest%20Continuous%20Increasing%20Subsequence.java)|Easy|[Array, Coordinate DP, DP, Sliding Window]|O(n)|O(1)|Java|344| |1007|[1007. Minimum Domino Rotations For Equal Row.java](https://github.com/awangdev/LintCode/blob/master/Java/1007.%20Minimum%20Domino%20Rotations%20For%20Equal%20Row.java)|Medium|[Array, Greedy]|O(n)|O(1)|Java|345| |485|[485. Max Consecutive Ones.java](https://github.com/awangdev/LintCode/blob/master/Java/485.%20Max%20Consecutive%20Ones.java)|Easy|[Array, Basic Implementation]|O(n)|O(1)|Java|346| |896|[896. Monotonic Array.java](https://github.com/awangdev/LintCode/blob/master/Java/896.%20Monotonic%20Array.java)|Easy|[Array]|||Java|347| |207|[207. Course Schedule.java](https://github.com/awangdev/LintCode/blob/master/Java/207.%20Course%20Schedule.java)|Medium|[BFS, Backtracking, DFS, Graph, Topological Sort]|O(n)|O(n)|Java|348| |327|[327. Count of Range Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/327.%20Count%20of%20Range%20Sum.java)|Hard|[BIT, Divide and Conquer, Merge Sort, PreSum, Segment Tree]|O(nlogn)|O(n)|Java|349| |987|[987. Vertical Order Traversal of a Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/987.%20Vertical%20Order%20Traversal%20of%20a%20Binary%20Tree.java)|Medium|[BFS, Binary Tree, DFS, Hash Table, Tree]|||Java|350| |26|[26.Remove Duplicates from Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/26.Remove%20Duplicates%20from%20Sorted%20Array.java)|Easy|[Array, Two Pointers]|||Java|351| |429|[429. N-ary Tree Level Order Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/429.%20N-ary%20Tree%20Level%20Order%20Traversal.java)|Medium|[BFS, Tree]|O(n)|O(n)|Java|352| |275|[275. H-Index II.java](https://github.com/awangdev/LintCode/blob/master/Java/275.%20H-Index%20II.java)|Medium|[Binary Search]|O(logN)|O(1) extra|Java|353| |204|[204. Count Primes.java](https://github.com/awangdev/LintCode/blob/master/Java/204.%20Count%20Primes.java)|Easy|[Hash Table, Math]|||Java|354| |58|[58. Length of Last Word.java](https://github.com/awangdev/LintCode/blob/master/Java/58.%20Length%20of%20Last%20Word.java)|Easy|[String]|||Java|355| |496|[496. Next Greater Element I.java](https://github.com/awangdev/LintCode/blob/master/Java/496.%20Next%20Greater%20Element%20I.java)|Easy|[Hash Table, Stack]|O(n)|O(n)|Java|356| |41|[41. First Missing Positive.java](https://github.com/awangdev/LintCode/blob/master/Java/41.%20First%20Missing%20Positive.java)|Hard|[Analysis, Array, Edge Case]|O(n)|O(1)|Java|357| |694|[694. Number of Distinct Islands.java](https://github.com/awangdev/LintCode/blob/master/Java/694.%20Number%20of%20Distinct%20Islands.java)|Medium|[DFS, Hash Table]|O(n)|O(n)|Java|358| |717|[717. 1-bit and 2-bit Characters.java](https://github.com/awangdev/LintCode/blob/master/Java/717.%201-bit%20and%202-bit%20Characters.java)|Easy|[Array]|||Java|359| |53|[53. Maximum Subarray.java](https://github.com/awangdev/LintCode/blob/master/Java/53.%20Maximum%20Subarray.java)|Easy|[Array, DFS, DP, Divide and Conquer, PreSum, Sequence DP, Subarray]|O(n)|O(n), O(1) rolling array|Java|360| |152|[152. Maximum Product Subarray.java](https://github.com/awangdev/LintCode/blob/master/Java/152.%20Maximum%20Product%20Subarray.java)|Medium|[Array, DP, PreProduct, Subarray]|O(n)|O(1)|Java|361| |199|[199. Binary Tree Right Side View.java](https://github.com/awangdev/LintCode/blob/master/Java/199.%20Binary%20Tree%20Right%20Side%20View.java)|Medium|[BFS, DFS, Tree]|O(n)|O(n)|Java|362| |259|[259. 3Sum Smaller.java](https://github.com/awangdev/LintCode/blob/master/Java/259.%203Sum%20Smaller.java)|Medium|[Array, Sort, Two Pointers]|||Java|363| |977|[977. Squares of a Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/977.%20Squares%20of%20a%20Sorted%20Array.java)|Easy|[Array, Two Pointers]|O(n)|O(n)|Java|364| |824|[824. Goat Latin.java](https://github.com/awangdev/LintCode/blob/master/Java/824.%20Goat%20Latin.java)|Easy|[Basic Implementation, String]|O(n)|O(1)|Java|365| |308|[308. Range Sum Query 2D - Mutable.java](https://github.com/awangdev/LintCode/blob/master/Java/308.%20Range%20Sum%20Query%202D%20-%20Mutable.java)|Hard|[Binary Indexed Tree, Segment Tree]|build(n), update(logn), rangeRuery(logn + k)|O(n)|Java|366| |1203|[1203. Sort Items by Groups Respecting Dependencies.java](https://github.com/awangdev/LintCode/blob/master/Java/1203.%20Sort%20Items%20by%20Groups%20Respecting%20Dependencies.java)|Hard|[BFS, DFS, Graph, Topological Sort]|O(V + E) to traverse the graph, #nodes + #edges|O(V + E)|Java|367| |1153|[1153. String Transforms Into Another String.java](https://github.com/awangdev/LintCode/blob/master/Java/1153.%20String%20Transforms%20Into%20Another%20String.java)|Hard|[Graph]|O(n)|O(n)|Java|368| |1008|[1008. Construct Binary Search Tree from Preorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/1008.%20Construct%20Binary%20Search%20Tree%20from%20Preorder%20Traversal.java)|Medium|[DFS, Tree]|O(n)|O(n)|Java|369| |151|[151. Reverse Words in a String.java](https://github.com/awangdev/LintCode/blob/master/Java/151.%20Reverse%20Words%20in%20a%20String.java)|Medium|[String]|O(n)||Java|370| |855|[855. Exam Room.java](https://github.com/awangdev/LintCode/blob/master/Java/855.%20Exam%20Room.java)|Medium|[PriorityQueue, Sort, TreeMap, TreeSet]|O(logn)|O(n)|Java|371| |31|[31. Next Permutation.java](https://github.com/awangdev/LintCode/blob/master/Java/31.%20Next%20Permutation.java)|Medium|[Array, Permutation]|O(n)|O(1)|Java|372| |518|[518. Coin Change 2.java](https://github.com/awangdev/LintCode/blob/master/Java/518.%20Coin%20Change%202.java)|Medium|[Backpack DP, DP]|O(n)|O(n)|Java|373| |405|[405. Convert a Number to Hexadecimal.java](https://github.com/awangdev/LintCode/blob/master/Java/405.%20Convert%20a%20Number%20to%20Hexadecimal.java)|Easy|[Bit Manipulation]|||Java|374| |850|[850. Rectangle Area II.java](https://github.com/awangdev/LintCode/blob/master/Java/850.%20Rectangle%20Area%20II.java)|Hard|[Segment Tree, Sweep Line]|O(n^2)|O(n)|Java|375| |515|[515. Find Largest Value in Each Tree Row.java](https://github.com/awangdev/LintCode/blob/master/Java/515.%20Find%20Largest%20Value%20in%20Each%20Tree%20Row.java)|Medium|[BFS, DFS, Tree]|O(n)|O(n)|Java|376| |253|[253. Meeting Rooms II.java](https://github.com/awangdev/LintCode/blob/master/Java/253.%20Meeting%20Rooms%20II.java)|Medium|[Greedy, Heap, PriorityQueue, Sort, Sweep Line]|O(nlogn)|O(n)|Java|377| |1161|[1161. Maximum Level Sum of a Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/1161.%20Maximum%20Level%20Sum%20of%20a%20Binary%20Tree.java)|Medium|[BFS, DFS, Graph]|O(n) visit all nodes|O(n)|Java|378| |509|[509. Fibonacci Number.java](https://github.com/awangdev/LintCode/blob/master/Java/509.%20Fibonacci%20Number.java)|Easy|[DP, Math, Memoization]|||Java|379| |221|[221. Maximal Square.java](https://github.com/awangdev/LintCode/blob/master/Java/221.%20Maximal%20Square.java)|Medium|[Coordinate DP, DP]|O(mn)|O(mn)|Java|380| |131|[131. Palindrome Partitioning.java](https://github.com/awangdev/LintCode/blob/master/Java/131.%20Palindrome%20Partitioning.java)|Medium|[Backtracking, DFS]|O(2^n)|O(n^2)|Java|381| |136|[136. Single Number.java](https://github.com/awangdev/LintCode/blob/master/Java/136.%20Single%20Number.java)|Easy|[Bit Manipulation, Hash Table]|||Java|382| |222|[222. Count Complete Tree Nodes.java](https://github.com/awangdev/LintCode/blob/master/Java/222.%20Count%20Complete%20Tree%20Nodes.java)|Medium|[Binary Search, DFS, Tree]|O(n)|O(h)|Java|383| |257|[257. Binary Tree Paths.java](https://github.com/awangdev/LintCode/blob/master/Java/257.%20Binary%20Tree%20Paths.java)|Easy|[Backtracking, Binary Tree, DFS]|O(n)|O(nlogn)|Java|384| |543|[543. Diameter of Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/543.%20Diameter%20of%20Binary%20Tree.java)|Easy|[Tree]|O(n) when non-balanced|O(n) when non-balanced|Java|385| |398|[398. Random Pick Index.java](https://github.com/awangdev/LintCode/blob/master/Java/398.%20Random%20Pick%20Index.java)|Medium|[Reservior Sampling]|O(n)|O(n) for input int[], O(1) extra space used|Java|386| |238|[238. Product of Array Except Self.java](https://github.com/awangdev/LintCode/blob/master/Java/238.%20Product%20of%20Array%20Except%20Self.java)|Medium|[Array, PreProduct]|O(n)|O(1)|Java|387| |1060|[1060. Missing Element in Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/1060.%20Missing%20Element%20in%20Sorted%20Array.java)|Medium|[Binary Search]|O(logn)|O(1)|Java|388| |1048|[1048. Longest String Chain.java](https://github.com/awangdev/LintCode/blob/master/Java/1048.%20Longest%20String%20Chain.java)|Medium|[Bucket Sort, DP, Hash Table, Sort]|O(n)|O(n)|Java|389| |67|[67. Add Binary.java](https://github.com/awangdev/LintCode/blob/master/Java/67.%20Add%20Binary.java)|Easy|[Math, String, Two Pointers]|||Java|390| |299|[299. Bulls and Cows.java](https://github.com/awangdev/LintCode/blob/master/Java/299.%20Bulls%20and%20Cows.java)|Medium|[Hash Table]|O(n)|O(n)|Java|391| |557|[557. Reverse Words in a String III.java](https://github.com/awangdev/LintCode/blob/master/Java/557.%20Reverse%20Words%20in%20a%20String%20III.java)|Easy|[String]|||Java|392| |203|[203. Remove Linked List Elements.java](https://github.com/awangdev/LintCode/blob/master/Java/203.%20Remove%20Linked%20List%20Elements.java)|Easy|[Linked List]|||Java|393| |1219|[1219. Path with Maximum Gold.java](https://github.com/awangdev/LintCode/blob/master/Java/1219.%20Path%20with%20Maximum%20Gold.java)|Medium|[Backtracking, DFS]|O(n^2)|O(n) recursive depth|Java|394| |266|[266. Palindrome Permutation.java](https://github.com/awangdev/LintCode/blob/master/Java/266.%20Palindrome%20Permutation.java)|Easy|[Hash Table]|O(n)|O(n)|Java|395| |62|[62. Unique Path.java](https://github.com/awangdev/LintCode/blob/master/Java/62.%20Unique%20Path.java)|Medium|[Array, Coordinate DP, DP]|O(mn)|O(mn), rolling array O(n)|Java|396| |1091|[1091. Shortest Path in Binary Matrix.java](https://github.com/awangdev/LintCode/blob/master/Java/1091.%20Shortest%20Path%20in%20Binary%20Matrix.java)|Medium|[BFS]|O(n^2)||Java|397| |1110|[1110. Delete Nodes And Return Forest.java](https://github.com/awangdev/LintCode/blob/master/Java/1110.%20Delete%20Nodes%20And%20Return%20Forest.java)|Medium|[DFS, Divide and Conquer, Tree]|O(n)|O(logn)|Java|398| |1249|[1249. Minimum Remove to Make Valid Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/1249.%20Minimum%20Remove%20to%20Make%20Valid%20Parentheses.java)|Medium|[Stack, String]|O(n)|O(n)|Java|399| |15|[15. 3Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/15.%203Sum.java)|Medium|[Array, Sort, Two Pointers]|O(n^2)||Java|400| |311|[311. Sparse Matrix Multiplication.java](https://github.com/awangdev/LintCode/blob/master/Java/311.%20Sparse%20Matrix%20Multiplication.java)|Medium|[Hash Table]|O(mnk), where `m = A.row`, `n = B.col`, `k = A.col = B.row`|O(1) extra|Java|401| |339|[339. Nested List Weight Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/339.%20Nested%20List%20Weight%20Sum.java)|Easy|[BFS, DFS, NestedInteger]|O(n)|O(h), h = levels|Java|402| |322|[322. Coin Change.java](https://github.com/awangdev/LintCode/blob/master/Java/322.%20Coin%20Change.java)|Medium|[Backpack DP, DFS, DP, Memoization]|O(n * S)|O(S)|Java|403| |55|[55. Jump Game.java](https://github.com/awangdev/LintCode/blob/master/Java/55.%20Jump%20Game.java)|Medium|[Array, DP, Greedy]|O(n)|O(1)|Java|404| |173|[173. Binary Search Tree Iterator.java](https://github.com/awangdev/LintCode/blob/master/Java/173.%20Binary%20Search%20Tree%20Iterator.java)|Medium|[BST, Design, Stack, Tree]|O(1) average|O(h)|Java|405| |140|[140. Word Break II.java](https://github.com/awangdev/LintCode/blob/master/Java/140.%20Word%20Break%20II.java)|Hard|[Backtracking, DFS, DP, Hash Table, Memoization]|O(n!)|O(n!)|Java|406| |51|[51. N-Queens.java](https://github.com/awangdev/LintCode/blob/master/Java/51.%20N-Queens.java)|Hard|[Backtracking]|O(n!)|O(n^2)|Java|407| |875|[875. Koko Eating Bananas.java](https://github.com/awangdev/LintCode/blob/master/Java/875.%20Koko%20Eating%20Bananas.java)|Medium|[Binary Search]|O(n*logM)|O(1)|Java|408| |189|[189. Rotate Array.java](https://github.com/awangdev/LintCode/blob/master/Java/189.%20Rotate%20Array.java)|Easy|[Array, Rotation]|||Java|409| |19|[19. Remove Nth Node From End of List.java](https://github.com/awangdev/LintCode/blob/master/Java/19.%20Remove%20Nth%20Node%20From%20End%20of%20List.java)|Medium|[Linked List, Two Pointers]|O(n)|O(1)|Java|410| |134|[134. Gas Station.java](https://github.com/awangdev/LintCode/blob/master/Java/134.%20Gas%20Station.java)|Medium|[Greedy]|O(n)|O(1)|Java|411| |119|[119. Pascal's Triangle II.java](https://github.com/awangdev/LintCode/blob/master/Java/119.%20Pascal's%20Triangle%20II.java)|Easy|[Array, Basic Implementation]|O(k^2), pascal triangle size|O(k^2)|Java|412| |1197|[1197. Minimum Knight Moves.java](https://github.com/awangdev/LintCode/blob/master/Java/1197.%20Minimum%20Knight%20Moves.java)|Medium|[BFS]|O(8^n)|O(8^n)|Java|413| |493|[493. Reverse Pairs.java](https://github.com/awangdev/LintCode/blob/master/Java/493.%20Reverse%20Pairs.java)|Medium|[BST, Binary Indexed Tree, Divide and Conquer, Merge Sort, Segment Tree]|||Java|414| |1306|[1306. Jump Game III.java](https://github.com/awangdev/LintCode/blob/master/Java/1306.%20Jump%20Game%20III.java)|Medium|[BFS, Graph]|O(n)|O(n)|Java|415| |305|[305. Number of Islands II.java](https://github.com/awangdev/LintCode/blob/master/Java/305.%20Number%20of%20Islands%20II.java)|Hard|[Union Find]|O(k * log(mn))|O(mn)|Java|416| |206|[206. Reverse Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/206.%20Reverse%20Linked%20List.java)|Easy|[Linked List]|||Java|417| |277|[277. Find the Celebrity.java](https://github.com/awangdev/LintCode/blob/master/Java/277.%20Find%20the%20Celebrity.java)|Medium|[Adjacency Matrix, Array, Graph, Greedy, Pruning]|O(n)|O(1)|Java|418| |741|[741. Cherry Pickup.java](https://github.com/awangdev/LintCode/blob/master/Java/741.%20Cherry%20Pickup.java)|Hard|[DFS, DP]|O(n^3)|O(n^3), memo size|Java|419| |168|[168. Excel Sheet Column Title.java](https://github.com/awangdev/LintCode/blob/master/Java/168.%20Excel%20Sheet%20Column%20Title.java)|Easy|[Math]|O(n)|O(1)|Java|420| |104|[104. Maximum Depth of Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/104.%20Maximum%20Depth%20of%20Binary%20Tree.java)|Easy|[DFS, Tree]|||Java|421| |349|[349. Intersection of Two Arrays.java](https://github.com/awangdev/LintCode/blob/master/Java/349.%20Intersection%20of%20Two%20Arrays.java)|Easy|[Binary Search, Hash Table, Sort, Two Pointers]|O(m + n)|O(m + n)|Java|422| |443|[443. String Compression.java](https://github.com/awangdev/LintCode/blob/master/Java/443.%20String%20Compression.java)|Easy|[Basic Implementation, String]|||Java|423| |297|[297. Serialize and Deserialize Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/297.%20Serialize%20and%20Deserialize%20Binary%20Tree.java)|Hard|[BFS, DFS, Deque, Design, Divide and Conquer, Tree]|O(n)|O(n)|Java|424| |46|[46. Permutations.java](https://github.com/awangdev/LintCode/blob/master/Java/46.%20Permutations.java)|Medium|[BFS, Backtracking, DFS, Permutation]|O(n!)|O(n!)|Java|425| |844|[844. Backspace String Compare.java](https://github.com/awangdev/LintCode/blob/master/Java/844.%20Backspace%20String%20Compare.java)|Easy|[Stack, Two Pointers]|O(n)|O(1)|Java|426| |9|[9. Palindrome Number.java](https://github.com/awangdev/LintCode/blob/master/Java/9.%20Palindrome%20Number.java)|Easy|[Math]|||Java|427| |1094|[1094. Car Pooling.java](https://github.com/awangdev/LintCode/blob/master/Java/1094.%20Car%20Pooling.java)|Medium|[Greedy, Heap, PriorityQueue, Sort]|O(n)|O(1) only use bucket size 1000|Java|428| |245|[245. Shortest Word Distance III.java](https://github.com/awangdev/LintCode/blob/master/Java/245.%20Shortest%20Word%20Distance%20III.java)|Medium|[Array, Design, Hash Table, Two Pointers]|O(n)|O(1)|Java|429| |1117|[1117. Building H2O.java](https://github.com/awangdev/LintCode/blob/master/Java/1117.%20Building%20H2O.java)|Medium|[Lock, Semaphore, Thread]|||Java|430| |973|[973. K Closest Points to Origin.java](https://github.com/awangdev/LintCode/blob/master/Java/973.%20K%20Closest%20Points%20to%20Origin.java)|Medium|[Divide and Conquer, Heap, Sort]|O(klogk)|O(k)|Java|431| |771|[771. Jewels and Stones.java](https://github.com/awangdev/LintCode/blob/master/Java/771.%20Jewels%20and%20Stones.java)|Easy|[Hash Table]|O(n)|O(n)|Java|432| |200|[200. Number of Islands.java](https://github.com/awangdev/LintCode/blob/master/Java/200.%20Number%20of%20Islands.java)|Medium|[BFS, DFS, Matrix DFS, Union Find]|O(n)|O(n)|Java|433| |141|[141. Linked List Cycle.java](https://github.com/awangdev/LintCode/blob/master/Java/141.%20Linked%20List%20Cycle.java)|Easy|[Cycle Detection, Linked List, Slow Fast Pointer, Two Pointers]|O(n)|O(1)|Java|434| |567|[567. Permutation in String.java](https://github.com/awangdev/LintCode/blob/master/Java/567.%20Permutation%20in%20String.java)|Medium|[Sliding Window, Two Pointers]|O(m + n)|O(1)|Java|435| |727|[727. Minimum Window Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/727.%20Minimum%20Window%20Subsequence.java)|Hard|[DP, Hash Table, Sliding Window, String, Two Pointers]|O(n^2)|O(1)|Java|436| |158|[158. Read N Characters Given Read4 II - Call multiple times.java](https://github.com/awangdev/LintCode/blob/master/Java/158.%20Read%20N%20Characters%20Given%20Read4%20II%20-%20Call%20multiple%20times.java)|Hard|[Enumeration, String]|O(n)|O(n)|Java|437| |369|[369. Plus One Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/369.%20Plus%20One%20Linked%20List.java)|Medium|[Linked List]|O(n)|O(1)|Java|438| |211|[211. Add and Search Word - Data structure design.java](https://github.com/awangdev/LintCode/blob/master/Java/211.%20Add%20and%20Search%20Word%20-%20Data%20structure%20design.java)|Medium|[Backtracking, Design, Trie]|O(n) to search and to add word|< O(mn), depends on the input. m = # of words|Java|439| |43|[43. Multiply Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/43.%20Multiply%20Strings.java)|Medium|[Math, String]|O(mn)|O(mn)|Java|440| |621|[621. Task Scheduler.java](https://github.com/awangdev/LintCode/blob/master/Java/621.%20Task%20Scheduler.java)|Medium|[Array, Enumeration, Greedy, PriorityQueue, Queue]|O(n)|O(1)|Java|441| |680|[680. Valid Palindrome II.java](https://github.com/awangdev/LintCode/blob/master/Java/680.%20Valid%20Palindrome%20II.java)|Easy|[String]|||Java|442| |295|[295. Find Median from Data Stream.java](https://github.com/awangdev/LintCode/blob/master/Java/295.%20Find%20Median%20from%20Data%20Stream.java)|Hard|[Design, Heap, MaxHeap, MinHeap]|O(1) get, O(logn) addNum|O(n)|Java|443| |70|[70. Climbing Stairs.java](https://github.com/awangdev/LintCode/blob/master/Java/70.%20Climbing%20Stairs.java)|Easy|[DP, Memoization, Sequence DP]|||Java|444| |747|[747. Largest Number At Least Twice of Others.java](https://github.com/awangdev/LintCode/blob/master/Java/747.%20Largest%20Number%20At%20Least%20Twice%20of%20Others.java)|Easy|[Array]|||Java|445| |315|[315. Count of Smaller Numbers After Self.java](https://github.com/awangdev/LintCode/blob/master/Java/315.%20Count%20of%20Smaller%20Numbers%20After%20Self.java)|Hard|[BST, Binary Indexed Tree, Binary Search, Divide and Conquer, Segment Tree]|O(nlogn)|O(n)|Java|446| |239|[239. Sliding Window Maximum.java](https://github.com/awangdev/LintCode/blob/master/Java/239.%20Sliding%20Window%20Maximum.java)|Hard|[Deque, Heap, Sliding Window]|O(n)|O(n)|Java|447| |47|[47. Permutations II.java](https://github.com/awangdev/LintCode/blob/master/Java/47.%20Permutations%20II.java)|Medium|[Backtracking, DFS]|||Java|448| |332|[332. Reconstruct Itinerary.java](https://github.com/awangdev/LintCode/blob/master/Java/332.%20Reconstruct%20Itinerary.java)|Medium|[Backtracking, DFS, Graph]|O(n^n)|O(m)|Java|449| |88|[88. Search in Rotated Sorted Array II.java](https://github.com/awangdev/LintCode/blob/master/Java/88.%20Search%20in%20Rotated%20Sorted%20Array%20II.java)|Medium|[Array, Binary Search]|O(logn), worst O(n)|O(1)|Java|450| |561|[561. Array Partition I.java](https://github.com/awangdev/LintCode/blob/master/Java/561.%20Array%20Partition%20I.java)|Easy|[Array]|O(nlogn)|O(1)|Java|451| |387|[387. First Unique Character in a String.java](https://github.com/awangdev/LintCode/blob/master/Java/387.%20First%20Unique%20Character%20in%20a%20String.java)|Easy|[Hash Table, String]|O(n)|O(256) = O(1)|Java|452| |345|[345. Reverse Vowels of a String.java](https://github.com/awangdev/LintCode/blob/master/Java/345.%20Reverse%20Vowels%20of%20a%20String.java)|Easy|[String, Two Pointers]|||Java|453| |39|[39. Combination Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/39.%20Combination%20Sum.java)|Medium|[Array, Backtracking, Combination, DFS]|O(k * 2^n), k = avg rst length|O(k) stack depth, if not counting result size|Java|454| |10|[10. Regular Expression Matching.java](https://github.com/awangdev/LintCode/blob/master/Java/10.%20Regular%20Expression%20Matching.java)|Hard|[Backtracking, DP, Double Sequence DP, Sequence DP, String]|||Java|455| |367|[367. Valid Perfect Square.java](https://github.com/awangdev/LintCode/blob/master/Java/367.%20Valid%20Perfect%20Square.java)|Easy|[Binary Search, Math]|O(logN)|O(1)|Java|456| |270|[270. Closest Binary Search Tree Value.java](https://github.com/awangdev/LintCode/blob/master/Java/270.%20Closest%20Binary%20Search%20Tree%20Value.java)|Easy|[BST, Binary Search, Tree]|O(logn)|O(1)|Java|457| |28|[28. Implement strStr().java](https://github.com/awangdev/LintCode/blob/master/Java/28.%20Implement%20strStr().java)|Easy|[String, Two Pointers]|||Java|458| |1106|[1106. Parsing A Boolean Expression.java](https://github.com/awangdev/LintCode/blob/master/Java/1106.%20Parsing%20A%20Boolean%20Expression.java)|Hard|[DFS, Stack, String]|||Java|459| |144|[144. Binary Tree Preorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/144.%20Binary%20Tree%20Preorder%20Traversal.java)|Medium|[BFS, DFS, Stack, Tree]|O(n)|O(n)|Java|460| |852|[852. Peak Index in a Mountain Array.java](https://github.com/awangdev/LintCode/blob/master/Java/852.%20Peak%20Index%20in%20a%20Mountain%20Array.java)|Easy|[Binary Search]|O(logn)|O(1)|Java|461| |146|[146. LRU Cache.java](https://github.com/awangdev/LintCode/blob/master/Java/146.%20LRU%20Cache.java)|Medium|[Design, Doubly Linked List, Hash Table, Linked List]|O(1)|O(1)|Java|462| |110|[110. Balanced Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/110.%20Balanced%20Binary%20Tree.java)|Easy|[DFS, Tree]|||Java|463| |1040|[1040. Moving Stones Until Consecutive II.java](https://github.com/awangdev/LintCode/blob/master/Java/1040.%20Moving%20Stones%20Until%20Consecutive%20II.java)|Medium|[Array, Sliding Window]|O(nlogn)|O(n)|Java|464| |246|[246. Strobogrammatic Number.java](https://github.com/awangdev/LintCode/blob/master/Java/246.%20Strobogrammatic%20Number.java)|Easy|[Enumeration, Hash Table, Math, Two Pointers]|O(n)|O(1)|Java|465| |100|[100. Same Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/100.%20Same%20Tree.java)|Easy|[BFS, DFS, Tree]|O(n)|O(logn)|Java|466| |307|[307. Range Sum Query - Mutable.java](https://github.com/awangdev/LintCode/blob/master/Java/307.%20Range%20Sum%20Query%20-%20Mutable.java)|Medium|[Binary Indexed Tree, Segment Tree]|build O(n), query (logn +k), update O(logn)|O(n)|Java|467| |88|[88. Merge Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/88.%20Merge%20Sorted%20Array.java)|Easy|[Array, Two Pointers]|O(n)|O(1)|Java|468| |319|[319. Bulb Switcher.java](https://github.com/awangdev/LintCode/blob/master/Java/319.%20Bulb%20Switcher.java)|Medium|[Brainteaser, Math]|O(1)|O(1)|Java|469| |112|[112. Path Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/112.%20Path%20Sum.java)|Easy|[DFS, Tree]|||Java|470| |463|[463. Island Perimeter.java](https://github.com/awangdev/LintCode/blob/master/Java/463.%20Island%20Perimeter.java)|Easy|[Hash Table]|O(n)||Java|471| |170|[170. Two Sum III - Data structure design.java](https://github.com/awangdev/LintCode/blob/master/Java/170.%20Two%20Sum%20III%20-%20Data%20structure%20design.java)|Easy|[Design, Hash Table, Memoization]|O(n)|O(n)|Java|472| |122|[122. Best Time to Buy and Sell Stock II.java](https://github.com/awangdev/LintCode/blob/master/Java/122.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock%20II.java)|Easy|[Array, DP, Greedy, Sequence DP, Status DP]|O(n)|O(1) greedy, O(n) dp|Java|473| |715|[715. Range Module.java](https://github.com/awangdev/LintCode/blob/master/Java/715.%20Range%20Module.java)|Hard|[Segment Tree, TreeSet]|query O(logn), update O(n)|O(n)|Java|474| |12|[12. Integer to Roman.java](https://github.com/awangdev/LintCode/blob/master/Java/12.%20Integer%20to%20Roman.java)|Medium|[Basic Implementation, Math, String]|O(n)|O(n)|Java|475| |14|[14. Longest Common Prefix.java](https://github.com/awangdev/LintCode/blob/master/Java/14.%20Longest%20Common%20Prefix.java)|Easy|[String]|||Java|476| |243|[243. Shortest Word Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/243.%20Shortest%20Word%20Distance.java)|Easy|[Array, Two Pointers]|O(n)|O(1)|Java|477| |414|[414. Third Maximum Number.java](https://github.com/awangdev/LintCode/blob/master/Java/414.%20Third%20Maximum%20Number.java)|Easy|[Array, PriorityQueue]|||Java|478| |1267|[1267. Count Servers that Communicate.java](https://github.com/awangdev/LintCode/blob/master/Java/1267.%20Count%20Servers%20that%20Communicate.java)|Medium|[Array, Graph]|O(mn)|O(m + n)|Java|479| |20|[20. Valid Parentheses.java](https://github.com/awangdev/LintCode/blob/master/Java/20.%20Valid%20Parentheses.java)|Easy|[Stack, String]|O(n)|O(n)|Java|480| |893|[893. Groups of Special-Equivalent Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/893.%20Groups%20of%20Special-Equivalent%20Strings.java)|Easy|[Basic Implementation, String]|||Java|481| |427|[427. Construct Quad Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/427.%20Construct%20Quad%20Tree.java)|Medium|[Tree]|O(n^2)|O(n^2)|Java|482| |981|[981. Time Based Key-Value Store.java](https://github.com/awangdev/LintCode/blob/master/Java/981.%20Time%20Based%20Key-Value%20Store.java)|Medium|[Binary Search, Hash Table, TreeMap]|set O(1), get(logn)|O(n)|Java|483| |169|[169. Majority Element.java](https://github.com/awangdev/LintCode/blob/master/Java/169.%20Majority%20Element.java)|Easy|[Array, Bit Manipulation, Divide and Conquer, Moore Voting, Sort]|O(n)|O(1)|Java|484| |234|[234. Palindrome Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/234.%20Palindrome%20Linked%20List.java)|Easy|[Linked List, Two Pointers]|O(n)|O(1)|Java|485| |202|[202. Happy Number.java](https://github.com/awangdev/LintCode/blob/master/Java/202.%20Happy%20Number.java)|Easy|[Hash Table, Math]|O(m), m iterations|O(m), m number in set|Java|486| |69|[69. Sqrt(x).java](https://github.com/awangdev/LintCode/blob/master/Java/69.%20Sqrt(x).java)|Easy|[Binary Search, Math]|||Java|487| |876|[876. Middle of Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/876.%20Middle%20of%20Linked%20List.java)|Easy|[Linked List]|||Java|488| |1026|[1026. Maximum Difference Between Node and Ancestor.java](https://github.com/awangdev/LintCode/blob/master/Java/1026.%20Maximum%20Difference%20Between%20Node%20and%20Ancestor.java)|Medium|[DFS, Tree]|O(n)|O(logn)|Java|489| |78|[78. Subsets.java](https://github.com/awangdev/LintCode/blob/master/Java/78.%20Subsets.java)|Medium|[Array, BFS, Backtracking, Bit Manipulation, DFS]|O(2^n)|O(2^n)|Java|490| |432|[432. All One Data Structure.java](https://github.com/awangdev/LintCode/blob/master/Java/432.%20All%20One%20Data%20Structure.java)|Hard|[Design, Doubly Linked List]|O(1)|O(n)|Java|491| |380|[380. Insert Delete GetRandom O(1).java](https://github.com/awangdev/LintCode/blob/master/Java/380.%20Insert%20Delete%20GetRandom%20O(1).java)|Medium|[Array, Design, Hash Table]|O(1) avg|O(n)|Java|492| |560|[560. Subarray Sum Equals K.java](https://github.com/awangdev/LintCode/blob/master/Java/560.%20Subarray%20Sum%20Equals%20K.java)|Medium|[Array, Hash Table, PreSum, Subarray]|O(n)|O(n)|Java|493| |219|[219. Contains Duplicate II.java](https://github.com/awangdev/LintCode/blob/master/Java/219.%20Contains%20Duplicate%20II.java)|Easy|[Array, Hash Table]|O(n)|O(n)|Java|494| |91|[91. Decode Ways.java](https://github.com/awangdev/LintCode/blob/master/Java/91.%20Decode%20Ways.java)|Medium|[DP, Partition DP, String]|O(n)|O(n)|Java|495| |205|[205. Isomorphic Strings.java](https://github.com/awangdev/LintCode/blob/master/Java/205.%20Isomorphic%20Strings.java)|Easy|[Hash Table]|O(n)|O(n)|Java|496| |639|[639. Decode Ways II.java](https://github.com/awangdev/LintCode/blob/master/Java/639.%20Decode%20Ways%20II.java)|Hard|[DP, Enumeration, Partition DP]|O(n)|O(n)|Java|497| |346|[346. Moving Average from Data Stream.java](https://github.com/awangdev/LintCode/blob/master/Java/346.%20Moving%20Average%20from%20Data%20Stream.java)|Easy|[Design, Queue, Sliding Window]|O(1) for `next()`|O(size) for fixed storage|Java|498| |145|[145. Binary Tree Postorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/145.%20Binary%20Tree%20Postorder%20Traversal.java)|Medium|[Stack, Tree, Two Stacks]|O(n)|O(n)|Java|499| |938|[938. Range Sum of BST.java](https://github.com/awangdev/LintCode/blob/master/Java/938.%20Range%20Sum%20of%20BST.java)|Easy|[BST, Recursion, Tree]|||Java|500| |210|[210. Course Schedule II.java](https://github.com/awangdev/LintCode/blob/master/Java/210.%20Course%20Schedule%20II.java)|Medium|[BFS, DFS, Graph, Topological Sort]|O(n)|O(n)|Java|501| |68|[68. Text Justification.java](https://github.com/awangdev/LintCode/blob/master/Java/68.%20Text%20Justification.java)|Hard|[Enumeration, String]|O(n) go over words|O(maxLength) buffer list|Java|502| |314|[314. Binary Tree Vertical Order Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/314.%20Binary%20Tree%20Vertical%20Order%20Traversal.java)|Medium|[BFS, DFS, Hash Table, Tree]|O(n)|O(n)|Java|503| |287|[287. Find the Duplicate Number.java](https://github.com/awangdev/LintCode/blob/master/Java/287.%20Find%20the%20Duplicate%20Number.java)|Medium|[Array, Binary Search, Binary Search on Value, Cycle Detection, Slow Fast Pointer, Two Pointers]|O(n)|O(1)|Java|504| |242|[242. Valid Anagram.java](https://github.com/awangdev/LintCode/blob/master/Java/242.%20Valid%20Anagram.java)|Easy|[Hash Table, Sort]|O(n)|O(1), unique chars|Java|505| |340|[340. Longest Substring with At Most K Distinct Characters.java](https://github.com/awangdev/LintCode/blob/master/Java/340.%20Longest%20Substring%20with%20At%20Most%20K%20Distinct%20Characters.java)|Hard|[Hash Table, LinkedHashMap, Sliding Window, String, Two Pointers]|O(n)|O(k)|Java|506| |217|[217. Contains Duplicate.java](https://github.com/awangdev/LintCode/blob/master/Java/217.%20Contains%20Duplicate.java)|Easy|[Array, Hash Table]|O(n)|O(1)|Java|507| |103|[103. Binary Tree Zigzag Level Order Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/103.%20Binary%20Tree%20Zigzag%20Level%20Order%20Traversal.java)|Medium|[BFS, Stack, Tree]|O(n)|O(n)|Java|508| |1057|[1057. Campus Bikes.java](https://github.com/awangdev/LintCode/blob/master/Java/1057.%20Campus%20Bikes.java)|Medium|[Bucket Sort, Greedy, PriorityQueue, Sort]|O(mn)|O(mn)|Java|509| |261|[261. Graph Valid Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/261.%20Graph%20Valid%20Tree.java)|Medium|[BFS, DFS, Graph, Union Find]|||Java|510| |64|[64. Minimum Path Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/64.%20Minimum%20Path%20Sum.java)|Medium|[Array, Coordinate DP, DP]|O(mn)|O(n) rolling array|Java|511| |796|[796. Rotate String.java](https://github.com/awangdev/LintCode/blob/master/Java/796.%20Rotate%20String.java)|Easy|[String]|||Java|512| |229|[229. Majority Element II.java](https://github.com/awangdev/LintCode/blob/master/Java/229.%20Majority%20Element%20II.java)|Medium|[Array, Moore Voting]|O(n)|(1)|Java|513| |1041|[1041. Robot Bounded In Circle.java](https://github.com/awangdev/LintCode/blob/master/Java/1041.%20Robot%20Bounded%20In%20Circle.java)|Easy|[String]|||Java|514| |2|[2. Add Two Numbers.java](https://github.com/awangdev/LintCode/blob/master/Java/2.%20Add%20Two%20Numbers.java)|Medium|[Linked List, Math]|O(max(m,n))|O(max(m,n))|Java|515| |157|[157. Read N Characters Given Read4.java](https://github.com/awangdev/LintCode/blob/master/Java/157.%20Read%20N%20Characters%20Given%20Read4.java)|Easy|[Enumeration, String]|||Java|516| |114|[114. Flatten Binary Tree to Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/114.%20Flatten%20Binary%20Tree%20to%20Linked%20List.java)|Medium|[Binary Tree, DFS]|O(n)|O(n), stacks|Java|517| |121|[121. Best Time to Buy and Sell Stock.java](https://github.com/awangdev/LintCode/blob/master/Java/121.%20Best%20Time%20to%20Buy%20and%20Sell%20Stock.java)|Easy|[Array, DP, Sequence DP]|||Java|518| |1004|[1004. Max Consecutive Ones III.java](https://github.com/awangdev/LintCode/blob/master/Java/1004.%20Max%20Consecutive%20Ones%20III.java)|Medium|[Sliding Window, Two Pointers]|O(n)|O(1)|Java|519| |1146|[1146. Snapshot Array.java](https://github.com/awangdev/LintCode/blob/master/Java/1146.%20Snapshot%20Array.java)|Medium|[Array, Hash Table, TreeMap]|O(1) set, O(logn) get, O(x) snap, x = # of changes|O(n * m), n = array size, m = # of snaps|Java|520| |273|[273. Integer to English Words.java](https://github.com/awangdev/LintCode/blob/master/Java/273.%20Integer%20to%20English%20Words.java)|Hard|[Enumeration, Math, String]|O(n)|O(1)|Java|521| |304|[304. Range Sum Query 2D - Immutable.java](https://github.com/awangdev/LintCode/blob/master/Java/304.%20Range%20Sum%20Query%202D%20-%20Immutable.java)|Medium|[DP, PreSum]|O(mn) build, O(1) query|O(mn)|Java|522| |605|[605. Can Place Flowers.java](https://github.com/awangdev/LintCode/blob/master/Java/605.%20Can%20Place%20Flowers.java)|Easy|[Array, Greedy]|O(n)|O(1)|Java|523| |1|[1. Two Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/1.%20Two%20Sum.java)|Easy|[Array, Hash Table]|O(n)|O(n)|Java|524| |118|[118. Pascal's Triangle.java](https://github.com/awangdev/LintCode/blob/master/Java/118.%20Pascal's%20Triangle.java)|Easy|[Array, Basic Implementation, List]|O(n^2) based on pascal triangle size|O(n^2)|Java|525| |23|[23. Merge k Sorted Lists.java](https://github.com/awangdev/LintCode/blob/master/Java/23.%20Merge%20k%20Sorted%20Lists.java)|Medium|[Divide and Conquer, Heap, Linked List, Merge Sort, PriorityQueue]|O(nlogk)|O(logk)|Java|526| |283|[283. Move Zeroes.java](https://github.com/awangdev/LintCode/blob/master/Java/283.%20Move%20Zeroes.java)|Easy|[Array, Two Pointers]|O(n)|O(1)|Java|527| |208|[208. Implement Trie (Prefix Tree).java](https://github.com/awangdev/LintCode/blob/master/Java/208.%20Implement%20Trie%20(Prefix%20Tree).java)|Medium|[Design, Trie]|||Java|528| |516|[516. Longest Palindromic Subsequence.java](https://github.com/awangdev/LintCode/blob/master/Java/516.%20Longest%20Palindromic%20Subsequence.java)|Medium|[DFS, DP, Interval DP, Memoization]|O(n^2)|O(n^2)|Java|529| |218|[218. The Skyline Problem.java](https://github.com/awangdev/LintCode/blob/master/Java/218.%20The%20Skyline%20Problem.java)|Hard|[BIT, Divide and Conquer, HashHeap, Heap, PriorityQueue, Segment Tree, Sweep Line]|O(n^2logn)|O(n)|Java|530| |430|[430. Flatten a Multilevel Doubly Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/430.%20Flatten%20a%20Multilevel%20Doubly%20Linked%20List.java)|Medium|[DFS, Linked List]|O(n)|O(1)|Java|531| |63|[63. Unique Paths II.java](https://github.com/awangdev/LintCode/blob/master/Java/63.%20Unique%20Paths%20II.java)|Medium|[Array, Coordinate DP, DP]|O(mn)|O(mn)|Java|532| |52|[52. N-Queens II.java](https://github.com/awangdev/LintCode/blob/master/Java/52.%20N-Queens%20II.java)|Hard|[Backtracking]|O(n!)|O(n)|Java|533| |1033|[1033. Moving Stones Until Consecutive.java](https://github.com/awangdev/LintCode/blob/master/Java/1033.%20Moving%20Stones%20Until%20Consecutive.java)|Easy|[Basic Implementation, Sort]|O(1), only 3 elements|O(1)|Java|534| |139|[139. Word Break.java](https://github.com/awangdev/LintCode/blob/master/Java/139.%20Word%20Break.java)|Medium|[DP, Hash Table, Sequence DP]|O(n^2)|O(n)|Java|535| |105|[105. Construct Binary Tree from Preorder and Inorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/105.%20Construct%20Binary%20Tree%20from%20Preorder%20and%20Inorder%20Traversal.java)|Medium|[Array, DFS, Divide and Conquer, Hash Table, Tree]|O(n)|O(n)|Java|536| |125|[125. Valid Palindrome.java](https://github.com/awangdev/LintCode/blob/master/Java/125.%20Valid%20Palindrome.java)|Easy|[String, Two Pointers]|||Java|537| |449|[449. Serialize and Deserialize BST.java](https://github.com/awangdev/LintCode/blob/master/Java/449.%20Serialize%20and%20Deserialize%20BST.java)|Medium|[Tree]|O(n)|O(n)|Java|538| |274|[274.H-Index.java](https://github.com/awangdev/LintCode/blob/master/Java/274.H-Index.java)|Medium|[Bucket Sort, Hash Table, Sort]|O(n)|O(n)|Java|539| |160|[160. Intersection of Two Linked Lists.java](https://github.com/awangdev/LintCode/blob/master/Java/160.%20Intersection%20of%20Two%20Linked%20Lists.java)|Easy|[Linked List]|||Java|540| |40|[40. Combination Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/40.%20Combination%20Sum%20II.java)|Medium|[Array, Backtracking, Combination, DFS]|O(k * 2^n), k = avg rst length|O(n) stack depth, if not counting result size|Java|541| |410|[410. Split Array Largest Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/410.%20Split%20Array%20Largest%20Sum.java)|N/A|[]|||Java|542| |724|[724. Find Pivot Index.java](https://github.com/awangdev/LintCode/blob/master/Java/724.%20Find%20Pivot%20Index.java)|Easy|[Array, PreSum]|O(n)|O(1)|Java|543| |523|[523. Continuous Subarray Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/523.%20Continuous%20Subarray%20Sum.java)|Medium|[Coordinate DP, DP, Math, PreSum, Subarray]|O(n)|O(k)|Java|544| |65|[65. Valid Number.java](https://github.com/awangdev/LintCode/blob/master/Java/65.%20Valid%20Number.java)|Hard|[Enumeration, Math, String]|O(n)|O(1)|Java|545| |350|[350. Intersection of Two Arrays II.java](https://github.com/awangdev/LintCode/blob/master/Java/350.%20Intersection%20of%20Two%20Arrays%20II.java)|Easy|[Binary Search, Hash Table, Sort, Two Pointers]|(n)|(n)|Java|546| |364|[364. Nested List Weight Sum II.java](https://github.com/awangdev/LintCode/blob/master/Java/364.%20Nested%20List%20Weight%20Sum%20II.java)|Medium|[DFS, NestedInteger]|O(n), visit all nodes|O(h), depth|Java|547| |49|[49. Group Anagrams.java](https://github.com/awangdev/LintCode/blob/master/Java/49.%20Group%20Anagrams.java)|Medium|[Hash Table, String]|O(nk)|O(nk)|Java|548| |720|[720. Longest Word in Dictionary.java](https://github.com/awangdev/LintCode/blob/master/Java/720.%20Longest%20Word%20in%20Dictionary.java)|Easy|[Hash Table, Trie]|O(nlogn)|O(n)|Java|549| |438|[438. Find All Anagrams in a String.java](https://github.com/awangdev/LintCode/blob/master/Java/438.%20Find%20All%20Anagrams%20in%20a%20String.java)|Medium|[Hash Table, Sliding Window, Two Pointers]|O(n)|O(1)|Java|550| |632|[632. Smallest Range Covering Elements from K Lists.java](https://github.com/awangdev/LintCode/blob/master/Java/632.%20Smallest%20Range%20Covering%20Elements%20from%20K%20Lists.java)|Hard|[Hash Table, Sliding Window, Two Pointers]|O(nlogn), n = total elements|O(n) to store sorted list|Java|551| |138|[138. Copy List with Random Pointer.java](https://github.com/awangdev/LintCode/blob/master/Java/138.%20Copy%20List%20with%20Random%20Pointer.java)|Medium|[Hash Table, Linked List]|O(n)|O(n)|Java|552| |159|[159. Longest Substring with At Most Two Distinct Characters.java](https://github.com/awangdev/LintCode/blob/master/Java/159.%20Longest%20Substring%20with%20At%20Most%20Two%20Distinct%20Characters.java)|Medium|[Hash Table, Sliding Window, String, Two Pointers]|O(n)|O(1)|Java|553| |1043|[1043. Partition Array for Maximum Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/1043.%20Partition%20Array%20for%20Maximum%20Sum.java)|Medium|[DFS, DP, Graph, Memoization]|O(n), calc memo[n]|O(n)|Java|554| |33|[33. Search in Rotated Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/33.%20Search%20in%20Rotated%20Sorted%20Array.java)|Medium|[Array, Binary Search]|O(logn)|O(1)|Java|555| |760|[760. Find Anagram Mappings.java](https://github.com/awangdev/LintCode/blob/master/Java/760.%20Find%20Anagram%20Mappings.java)|Easy|[Hash Table]|O(n)|O(n)|Java|556| |133|[133. Clone Graph.java](https://github.com/awangdev/LintCode/blob/master/Java/133.%20Clone%20Graph.java)|Medium|[BFS, DFS, Graph]|O(n)|O(n)|Java|557| |743|[743. Network Delay Time.java](https://github.com/awangdev/LintCode/blob/master/Java/743.%20Network%20Delay%20Time.java)|Medium|[BFS, DFS, Graph, Heap, PQ]|O(nlogn)|O(n)|Java|558| |636|[636. Exclusive Time of Functions.java](https://github.com/awangdev/LintCode/blob/master/Java/636.%20Exclusive%20Time%20of%20Functions.java)|Medium|[Stack]|O(n)|O(n)|Java|559| |692|[692. Top K Frequent Words.java](https://github.com/awangdev/LintCode/blob/master/Java/692.%20Top%20K%20Frequent%20Words.java)|Medium|[Hash Table, Heap, MaxHeap, MinHeap, PriorityQueue, Trie]|O(n)|O(n)|Java|560| |1170|[1170. Compare Strings by Frequency of the Smallest Character.java](https://github.com/awangdev/LintCode/blob/master/Java/1170.%20Compare%20Strings%20by%20Frequency%20of%20the%20Smallest%20Character.java)|Easy|[Array, String]|O(m + n)|O(m + n)|Java|561| |426|[426. Convert Binary Search Tree to Sorted Doubly Linked List.java](https://github.com/awangdev/LintCode/blob/master/Java/426.%20Convert%20Binary%20Search%20Tree%20to%20Sorted%20Doubly%20Linked%20List.java)|Medium|[BST, DFS, Divide and Conquer, Linked List, Tree]|O(n)|O(1)|Java|562| |745|[745. Prefix and Suffix Search.java](https://github.com/awangdev/LintCode/blob/master/Java/745.%20Prefix%20and%20Suffix%20Search.java)|Hard|[Trie]|O(N + Q)|O(N)|Java|563| |8|[8. String to Integer (atoi).java](https://github.com/awangdev/LintCode/blob/master/Java/8.%20String%20to%20Integer%20(atoi).java)|Medium|[Math, String]|O(n)|O(n)|Java|564| |361|[361. Bomb Enemy.java](https://github.com/awangdev/LintCode/blob/master/Java/361.%20Bomb%20Enemy.java)|Medium|[Coordinate DP, DP]|O(mn)|O(n) by calculating column sum|Java|565| |94|[94. Binary Tree Inorder Traversal.java](https://github.com/awangdev/LintCode/blob/master/Java/94.%20Binary%20Tree%20Inorder%20Traversal.java)|Easy|[Hash Table, Stack, Tree]|O(n)|O(logn)|Java|566| |402|[402. Remove K Digits.java](https://github.com/awangdev/LintCode/blob/master/Java/402.%20Remove%20K%20Digits.java)|Medium|[Greedy, Monotonous Stack, Stack]|O(n)|O(n)|Java|567| |98|[98. Validate Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/98.%20Validate%20Binary%20Search%20Tree.java)|Medium|[BST, DFS, Divide and Conquer, Tree]|O(n)|O(logn)|Java|568| |1123|[1123. Lowest Common Ancestor of Deepest Leaves.java](https://github.com/awangdev/LintCode/blob/master/Java/1123.%20Lowest%20Common%20Ancestor%20of%20Deepest%20Leaves.java)|Medium|[BFS, DFS, Tree]|O(n)|O(n)|Java|569| |921|[921. Minimum Add to Make Parentheses Valid.java](https://github.com/awangdev/LintCode/blob/master/Java/921.%20Minimum%20Add%20to%20Make%20Parentheses%20Valid.java)|Medium|[]|O(n)|O(1)|Java|570| |399|[399. Evaluate Division.java](https://github.com/awangdev/LintCode/blob/master/Java/399.%20Evaluate%20Division.java)|Medium|[BFS, DFS, Graph, Union Find]|||Java|571| |785|[785. Is Graph Bipartite.java](https://github.com/awangdev/LintCode/blob/master/Java/785.%20Is%20Graph%20Bipartite.java)|Medium|[BFS, DFS, Garph]|O(n)|O(n)|Java|572| |767|[767. Reorganize String.java](https://github.com/awangdev/LintCode/blob/master/Java/767.%20Reorganize%20String.java)|Medium|[Greedy, Hash Table, Heap, Sort, String]|O(m), m = # of unique letters|O(nLogm), n = length|Java|573| |71|[71. Simplify Path.java](https://github.com/awangdev/LintCode/blob/master/Java/71.%20Simplify%20Path.java)|Medium|[Stack, String]|O(n)|O(n)|Java|574| |34|[34. Find First and Last Position of Element in Sorted Array.java](https://github.com/awangdev/LintCode/blob/master/Java/34.%20Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array.java)|Medium|[Array, Binary Search]|O(logn)|O(1)|Java|575| |278|[278. First Bad Version.java](https://github.com/awangdev/LintCode/blob/master/Java/278.%20First%20Bad%20Version.java)|Easy|[Binary Search]|O(logN)|O(1)|Java|576| |124|[124. Binary Tree Maximum Path Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/124.%20Binary%20Tree%20Maximum%20Path%20Sum.java)|Hard|[DFS, DP, Tree, Tree DP]|O(n)|O(logn)|Java|577| |721|[721. Accounts Merge.java](https://github.com/awangdev/LintCode/blob/master/Java/721.%20Accounts%20Merge.java)|Medium|[DFS, Hash Table, Union Find]|||Java|578| |689|[689. Maximum Sum of 3 Non-Overlapping Subarrays.java](https://github.com/awangdev/LintCode/blob/master/Java/689.%20Maximum%20Sum%20of%203%20Non-Overlapping%20Subarrays.java)|Hard|[Array, DP]|O(n)|O(n)|Java|579| |101|[101. Symmetric Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/101.%20Symmetric%20Tree.java)|Easy|[BFS, DFS, Tree]|O(n)|O(n)|Java|580| |149|[149. Max Points on a Line.java](https://github.com/awangdev/LintCode/blob/master/Java/149.%20Max%20Points%20on%20a%20Line.java)|Hard|[Array, Geometry, Hash Table, Math]|O(n^2)|O()|Java|581| |698|[698. Partition to K Equal Sum Subsets.java](https://github.com/awangdev/LintCode/blob/master/Java/698.%20Partition%20to%20K%20Equal%20Sum%20Subsets.java)|Medium|[DFS, DP, Recursion]|O(k^(n-k) * k!)|O(n)|Java|582| |57|[57. Insert Interval.java](https://github.com/awangdev/LintCode/blob/master/Java/57.%20Insert%20Interval.java)|Hard|[Array, PriorityQueue, Sort, Sweep Line]|O(n)|O(n)|Java|583| |13|[13. Roman to Integer.java](https://github.com/awangdev/LintCode/blob/master/Java/13.%20Roman%20to%20Integer.java)|Easy|[Math, String]|O(n)|O(1)|Java|584| |716|[716. Max Stack.java](https://github.com/awangdev/LintCode/blob/master/Java/716.%20Max%20Stack.java)|Medium|[Design, Doubly Linked List, Stack, TreeMap]|avg O(1), [O(logN) peekMax(), TreeMap]; [O(n) popMax(), TwoStack]|O(n)|Java|585| |671|[671. Second Minimum Node In a Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/671.%20Second%20Minimum%20Node%20In%20a%20Binary%20Tree.java)|Easy|[BFS, Tree]|O(n)|O(n) leaf nodes|Java|586| |366|[366. Find Leaves of Binary Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/366.%20Find%20Leaves%20of%20Binary%20Tree.java)|Medium|[DFS, Tree]|O(n)|O(h)|Java|587| |235|[235. Lowest Common Ancestor of a Binary Search Tree.java](https://github.com/awangdev/LintCode/blob/master/Java/235.%20Lowest%20Common%20Ancestor%20of%20a%20Binary%20Search%20Tree.java)|Easy|[BST, DFS, Tree]|O(logn)|O(logn)|Java|588| |156|[156. Binary Tree Upside Down.java](https://github.com/awangdev/LintCode/blob/master/Java/156.%20Binary%20Tree%20Upside%20Down.java)|Medium|[DFS, Tree]|O(n)|O(h)|Java|589| |416|[416. Partition Equal Subset Sum.java](https://github.com/awangdev/LintCode/blob/master/Java/416.%20Partition%20Equal%20Subset%20Sum.java)|Medium|[Backpack, DP]|||Java|590| |611|[611. Valid Triangle Number.java](https://github.com/awangdev/LintCode/blob/master/Java/611.%20Valid%20Triangle%20Number.java)|Medium|[Array, Two Pointers]|O(n^2)|O(logn), sorting space|Java|591| |341|[341. Flatten Nested List Iterator.java](https://github.com/awangdev/LintCode/blob/master/Java/341.%20Flatten%20Nested%20List%20Iterator.java)|Medium|[Design, NestedInteger, Stack]|O(n)|O(n)|Java|592| |254|[254. Factor Combinations.java](https://github.com/awangdev/LintCode/blob/master/Java/254.%20Factor%20Combinations.java)|Medium|[BFS, Backtracking, DFS]|O(x), x is the # of results|O(y), y is all ongoing candidates in queue|Java|593| |739|[739. Daily Temperatures.java](https://github.com/awangdev/LintCode/blob/master/Java/739.%20Daily%20Temperatures.java)|Medium|[Hash Table, Monotonous Stack, Stack]|O(n)|O(n)|Java|594| |373|[373. Find K Pairs with Smallest Sums.java](https://github.com/awangdev/LintCode/blob/master/Java/373.%20Find%20K%20Pairs%20with%20Smallest%20Sums.java)|Medium|[Heap, MaxHeap, MinHeap]|O(klogk)|O(k)|Java|595| |256|[256. Paint House.java](https://github.com/awangdev/LintCode/blob/master/Java/256.%20Paint%20House.java)|Easy|[DP, Sequence DP, Status DP]|O(nm), m = # of colors|O(nm), or O(1) with rolling array|Java|596| |265|[265. Paint House II.java](https://github.com/awangdev/LintCode/blob/master/Java/265.%20Paint%20House%20II.java)|Hard|[DP, Sequence DP, Status DP]|O(NK^2):|O(K) with rolling array|Java|597| |272|[272. Closest Binary Search Tree Value II.java](https://github.com/awangdev/LintCode/blob/master/Java/272.%20Closest%20Binary%20Search%20Tree%20Value%20II.java)|Hard|[Stack, Tree]|O(n)|O(n)|Java|598| |72|[72. Edit Distance.java](https://github.com/awangdev/LintCode/blob/master/Java/72.%20Edit%20Distance.java)|Hard|[DP, Double Sequence DP, Sequence DP, String]|O(MN)||Java|599| |215|[215. Kth Largest Element in an Array.java](https://github.com/awangdev/LintCode/blob/master/Java/215.%20Kth%20Largest%20Element%20in%20an%20Array.java)|Medium|[Divide and Conquer, Heap, MinHeap, PriorityQueue, Quick Select, Quick Sort]|O(nlogk)|O(k)|Java|600|