LintCode Solutions
These are solutions to the problems on LintCode.
String(6)
- LintCode-32.Minimum Window Substring
- LintCode-55.Compare Strings
- LintCode-133.Longest Words
- LintCode-158.Two Strings Are Anagrams
- LintCode-171.Anagrams
- LintCode-384.Longest Substring Without Repeating Characters
Math(2)
Data Structure(9)
- LintCode-40.Implement Queue by Two Stacks
- LintCode-122.Largest Rectangle in Histogram
- LintCode-229.Stack Sorting
- LintCode-423.Valid Parentheses
- LintCode-442.Implement Trie
- LintCode-473.Add and Search Word
- LintCode-492.Implement Queue by Linked List
- LintCode-493.Implement Queue by Linked List II
- LintCode-494.Implement Stack by Two Queues
Linked List(8)
- LintCode-167.Add Two Numbers
- LintCode-170.Rotate List
- LintCode-217.Remove Duplicates from Unsorted List
- LintCode-221.Add Two Numbers II
- LintCode-223.Palindrome Linked List
- LintCode-380.Intersection of Two Linked Lists
- LintCode-451.Swap Nodes in Pairs
- LintCode-511.Swap Two Nodes in Linked List
Array(27)
- LintCode-41.Maximum Subarray
- LintCode-42.Maximum Subarray II
- LintCode-45.Maximum Subarray Difference
- LintCode-46. Majority Number
- LintCode-56.Two Sum
- LintCode-57.3Sum
- LintCode-58.4Sum
- LintCode-59.3Sum Closest
- LintCode-533.Two Sum Closest
- LintCode-100.Remove Duplicates from Sorted Array
- LintCode-101.Remove Duplicates from Sorted Array II
- LintCode-138.Subarray Sum
- LintCode-143.Sort Colors II
- LintCode-148.Sort Colors
- LintCode-144.Interleaving Positive and Negative Numbers
- LintCode-149.Best Time to Buy and Sell Stock
- LintCode-150.Best Time to Buy and Sell Stock II
- LintCode-151.Best Time to Buy and Sell Stock III
- LintCode-135.Combination Sum
- LintCode-153.Combination Sum II
- LintCode-172.Remove Element
- LintCode-363.Trapping Rain Water
- LintCode-383.Container With Most Water
- LintCode-373.Partition Array by Odd and Even
- LintCode-402.Continuous Subarray Sum
- LintCode-406.Minimum Size Subarray Sum
- LintCode-539.Move Zeroes
- LintCode-547.Intersection of Two Arrays
- LintCode-548.Intersection of Two Arrays II
Binary Search(7)
- LintCode-14.First Position of Target
- LintCode-60.Search Insert Position
- LintCode-62.Search in Rotated Sorted Array
- LintCode-63.Search in Rotated Sorted Array II
- LintCode-159.Find Minimum in Rotated Sorted Array
- LintCode-160.Find Minimum in Rotated Sorted Array II
- LintCode-183.Wood Cut
Tree(9)
- LintCode-66.Binary Tree Preorder Traversal
- LintCode-67.Binary Tree Inorder Traversal
- LintCode-68.Binary Tree Postorder Traversal
- LintCode-69.Binary Tree Level Order Traversal
- LintCode-70.Binary Tree Level Order Traversal II
- LintCode-71.Binary Tree Zigzag Level Order Traversal
- LintCode-72.Construct Binary Tree from Inorder and Postorder Traversal
- LintCode-73.Construct Binary Tree from Preorder and Inorder Traversal
- LintCode-376. Binary Tree Path Sum
Segment Tree(8)
- LintCode-201.Segment Tree Build
- LintCode-439.Segment Tree Build II
- LintCode-202.Segment Tree Query
- LintCode-203.Segment Tree Modify
- LintCode-247.Segment Tree Query II
- LintCode-205.Interval Minimum Number
- LintCode-206.Interval Sum
- LintCode-207.Interval Sum II
Dynamic Programming(6)
- LintCode-92.Backpack
- LintCode-125.Backpack II
- LintCode-109. Triangle
- LintCode-392.House Robber
- LintCode-111.Climbing Stairs
- LintCode-436.Maximal Square
Search(2)
Graph(6)