Skip to content

assassint2017/leetcode-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-algorithm

total easy medium hard
300 110 153 37

  1. Two Sum
  2. Add Two Numbers
  3. Longest Substring Without Repeating Characters
  4. Median of Two Sorted Arrays
  5. Longest Palindromic Substring
  6. ZigZag Conversion
  7. Reverse Integer
  8. String to Integer (atoi)
  9. Palindrome Number
  10. Regular Expression Matching

  1. Container With Most Water
  2. Integer to Roman
  3. Roman to Integer
  4. Longest Common Prefix
  5. 3Sum
  6. 3Sum Closest
  7. Letter Combinations of a Phone Number
  8. 4Sum
  9. Remove Nth Node From End of List
  10. Valid Parentheses

  1. Merge Two Sorted Lists
  2. Generate Parentheses
  3. Merge k Sorted Lists
  4. Swap Nodes in Pairs
  5. Reverse Nodes in k-Group
  6. Remove Duplicates from Sorted Array
  7. Remove Element
  8. Implement strStr()
  9. Divide Two Integers
  10. Substring with Concatenation of All Words

  1. Next Permutation
  2. Longest Valid Parentheses
  3. Search in Rotated Sorted Array
  4. Find First and Last Position of Element in Sorted Array
  5. Search Insert Position
  6. Valid Sudoku
  7. Sudoku Solver
  8. Count and Say
  9. Combination Sum
  10. Combination Sum II

  1. First Missing Positive
  2. Trapping Rain Water
  3. Multiply Strings
  4. Wildcard Matching
  5. Jump Game II
  6. Permutations
  7. Permutations II
  8. Rotate Image
  9. Group Anagrams
  10. Pow(x, n)

  1. N-Queens
  2. N-Queens II
  3. Maximum Subarray
  4. Spiral Matrix
  5. Jump Game
  6. Merge Intervals
  7. Insert Interval
  8. Length of Last Word
  9. Spiral Matrix II
  10. Permutation Sequence

  1. Rotate List
  2. Unique Paths
  3. Unique Paths II
  4. Minimum Path Sum
  5. Plus One
  6. Add Binary
  7. Sqrt(x)
  8. Climbing Stairs

  1. Simplify Path
  2. Edit Distance
  3. Set Matrix Zeroes
  4. Search a 2D Matrix
  5. Sort Colors
  6. Minimum Window Substring
  7. Combinations
  8. Subsets
  9. Word Search
  10. Remove Duplicates from Sorted Array II

  1. Search in Rotated Sorted Array II
  2. Remove Duplicates from Sorted List II
  3. Remove Duplicates from Sorted List
  4. Largest Rectangle in Histogram
  5. Maximal Rectangle
  6. Partition List
  7. Merge Sorted Array
  8. Gray Code
  9. Subsets II

  1. Decode Ways
  2. Reverse Linked List II
  3. Restore IP Addresses
  4. Binary Tree Inorder Traversal
  5. Unique Binary Search Trees II
  6. Unique Binary Search Trees
  7. Interleaving String
  8. Validate Binary Search Tree
  9. Recover Binary Search Tree
  10. Same Tree

  1. Symmetric Tree
  2. Binary Tree Level Order Traversal
  3. Binary Tree Zigzag Level Order Traversal
  4. Maximum Depth of Binary Tree
  5. Construct Binary Tree from Preorder and Inorder Traversal
  6. Construct Binary Tree from Inorder and Postorder Traversal
  7. Binary Tree Level Order Traversal II
  8. Convert Sorted Array to Binary Search Tree
  9. Convert Sorted List to Binary Search Tree
  10. Balanced Binary Tree

  1. Minimum Depth of Binary Tree
  2. Path Sum
  3. Path Sum II
  4. Flatten Binary Tree to Linked List
  5. Distinct Subsequences
  6. Populating Next Right Pointers in Each Node
  7. Populating Next Right Pointers in Each Node II
  8. Pascal's Triangle
  9. Pascal's Triangle II
  10. Triangle

  1. Best Time to Buy and Sell Stock
  2. Best Time to Buy and Sell Stock II
  3. Best Time to Buy and Sell Stock III
  4. Binary Tree Maximum Path Sum
  5. Valid Palindrome
  6. Word Ladder II
  7. Word Ladder
  8. Longest Consecutive Sequence
  9. Sum Root to Leaf Numbers
  10. Surrounded Regions

  1. Palindrome Partitioning
  2. Palindrome Partitioning II
  3. Candy
  4. Single Number
  5. Single Number II
  6. Copy List with Random Pointer
  7. Word Break
  8. Word Break II

  1. Linked List Cycle
  2. Linked List Cycle II
  3. Reorder List
  4. Binary Tree Preorder Traversal
  5. Binary Tree Postorder Traversal
  6. LRU Cache
  7. Insertion Sort List
  8. Sort List
  9. Max Points on a Line
  10. Evaluate Reverse Polish Notation

  1. Reverse Words in a String
  2. Maximum Product Subarray
  3. Find Minimum in Rotated Sorted Array
  4. Find Minimum in Rotated Sorted Array II
  5. Min Stack
  6. Intersection of Two Linked Lists
  7. Find Peak Element
  8. Two Sum II - Input array is sorted
  9. Excel Sheet Column Title
  10. Majority Element
  11. Excel Sheet Column Number
  12. Factorial Trailing Zeroes
  13. Binary Search Tree Iterator
  14. Combine Two Tables
  15. Second Highest Salary
  16. Largest Number
  17. Employees Earning More Than Their Managers
  18. Duplicate Emails
  19. Customers Who Never Order
  20. Best Time to Buy and Sell Stock IV
  21. Rotate Array
  22. Reverse Bits
  23. Number of 1 Bits
  24. Rising Temperature
  25. Delete Duplicate Emails
  26. Rising Temperature
  27. House Robber
  28. Binary Tree Right Side View
  29. Number of Islands
  30. Bitwise AND of Numbers Range
  31. Happy Number
  32. Remove Linked List Elements
  33. Count Primes
  34. Reverse Linked List
  35. Course Schedule
  36. Implement Trie (Prefix Tree)
  37. Course Schedule II
  38. Add and Search Word - Data structure design
  39. House Robber II
  40. Kth Largest Element in an Array
  41. Combination Sum III
  42. Maximal Square
  43. Count Complete Tree Nodes
  44. Implement Stack using Queues
  45. Kth Smallest Element in a BST
  46. Power of Two
  47. Implement Queue using Stacks
  48. Number of Digit One
  49. Palindrome Linked List
  50. Lowest Common Ancestor of a Binary Tree
  51. Delete Node in a Linked List
  52. Sliding Window Maximum
  53. Search a 2D Matrix II
  54. Binary Tree Paths
  55. Single Number III
  56. Ugly Number
  57. Ugly Number II
  58. Move Zeroes
  59. Serialize and Deserialize Binary Tree
  60. Longest Increasing Subsequence
  61. Range Sum Query - Mutable
  62. Best Time to Buy and Sell Stock with Cooldown
  63. Minimum Height Trees
  64. Coin Change
  65. Odd Even Linked List
  66. Longest Increasing Path in a Matrix
  67. House Robber III
  68. Reverse String
  69. Top K Frequent Elements
  70. Combination Sum IV
  71. Shuffle an Array
  72. First Unique Character in a String
  73. Find the Difference
  74. Is Subsequence
  75. Decode String
  76. Longest Substring with At Least K Repeating Characters
  77. Sum of Left Leaves
  78. Third Maximum Number
  79. Add Strings
  80. Maximum XOR of Two Numbers in an Array
  81. N-ary Tree Level Order Traversal
  82. Path Sum III
  83. Arranging Coins
  84. Find All Duplicates in an Array
  85. Add Two Numbers II
  86. Find All Numbers Disappeared in an Array
  87. Sort Characters By Frequency
  88. Can I Win
  89. Unique Substrings in Wraparound String
  90. Implement Rand10() Using Rand7()
  91. Heaters
  92. Increasing Subsequences
  93. Target Sum
  94. Next Greater Element I
  95. Keyboard Row
  96. Fibonacci Number
  97. Find Bottom Left Tree Value
  98. Random Pick with Weight
  99. 01 Matrix
  100. Diameter of Binary Tree
  101. Friend Circles
  102. Maximum Depth of N-ary Tree
  103. N-ary Tree Preorder Traversal
  104. N-ary Tree Postorder Traversal
  105. Big Countries
  106. Classes More Than 5 Students
  107. Not Boring Movies
  108. Design Circular Queue
  109. Swap Salary
  110. Maximum Product of Three Numbers
  111. Sum of Square Numbers
  112. Average of Levels in Binary Tree
  113. Redundant Connection
  114. Longest Continuous Increasing Subsequence
  115. Top K Frequent Words
  116. Degree of an Array
  117. Search in a Binary Search Tree
  118. Kth Largest Element in a Stream
  119. Design HashSet
  120. Design HashMap
  121. Design Linked List
  122. Best Time to Buy and Sell Stock with Transaction Fee
  123. Maximum Length of Repeated Subarray
  124. Longest Word in Dictionary
  125. Find Pivot Index
  126. Daily Temperatures
  127. Min Cost Climbing Stairs
  128. Open the Lock
  129. Reach a Number
  130. Reorganize String
  131. Is Graph Bipartite?
  132. Number of Matching Subsequences
  133. Rotate String
  134. Find Eventual Safe States
  135. Number of Lines To Write String
  136. Consecutive Numbers Sum
  137. Shifting Letters
  138. Peak Index in a Mountain Array
  139. Leaf-Similar Trees
  140. Length of Longest Fibonacci Subsequence
  141. Construct Binary Tree from Preorder and Postorder Traversal
  142. Bitwise ORs of Subarrays
  143. Sum of Subarray Minimums
  144. Word Subsets
  145. Range Sum of BST
  146. Delete Columns to Make Sorted
  147. Bag of Tokens
  148. K Closest Points to Origin
  149. Squares of a Sorted Array
  150. Smallest String Starting From Leaf
  151. Broken Calculator
  152. Rotting Oranges
  153. Binary Search Tree to Greater Sum Tree
  154. Longest String Chain
  155. Letter Tile Possibilities

About

leetcode algorithms solve by python3 and cpp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published