| English | 简体中文 |

leetcode-logo

My LeetCode Solutions


Last updated: 2020-07-03 11:05:31

# Title Solutions Acceptance Difficulty Tags
887 Super Egg Drop Go 28.6% hard MathBinary SearchDynamic Programming
787 Cheapest Flights Within K Stops Go 35.9% medium HeapBreadth-first SearchDynamic Programming
763 Partition Labels Go 71.4% medium GreedyTwo Pointers
744 Find Smallest Letter Greater Than Target Go 44.9% easy Binary Search
739 Daily Temperatures❤️ Go 63.9% medium StackHash Table
695 Max Area of Island Go 63.7% medium Depth-first SearchArray
687 Longest Univalue Path Go 40.8% easy TreeRecursion
685 Redundant Connection II Go 35.3% hard TreeDepth-first SearchUnion FindGraph
684 Redundant Connection Go 59.5% medium TreeUnion FindGraph
671 Second Minimum Node In a Binary Tree Go 46.8% easy Tree
669 Trim a Binary Search Tree Go 66.1% easy Tree
665 Non-decreasing Array Go 22.4% easy Array
647 Palindromic Substrings Go 61.8% medium StringDynamic Programming
637 Average of Levels in Binary Tree Go 64.6% easy Tree
633 Sum of Square Numbers Go 33.5% easy Math
621 Task Scheduler Go 49.8% medium GreedyQueueArray
617 Merge Two Binary Trees Go 76.6% easy Tree
605 Can Place Flowers Go 32.1% easy Array
581 Shortest Unsorted Continuous Subarray Go 34.7% easy Array
572 Subtree of Another Tree Go 46.9% easy Tree
560 Subarray Sum Equals K❤️ Go 44.6% medium ArrayHash Table
547 Friend Circles Go 57.2% medium Depth-first SearchUnion Find
543 Diameter of Binary Tree❤️ Go 50.6% easy Tree
540 Single Element in a Sorted Array Go 60.2% medium
538 Convert BST to Greater Tree Go 62.1% easy Tree
524 Longest Word in Dictionary through Deleting Go 45.6% medium SortTwo Pointers
513 Find Bottom Left Tree Value Go 70.5% medium TreeDepth-first SearchBreadth-first Search
501 Find Mode in Binary Search Tree Go 45.0% easy Tree
494 Target Sum Go 44.4% medium Depth-first SearchDynamic Programming
461 Hamming Distance Go 76.6% easy Bit Manipulation
460 LFU Cache Go 41.9% hard Design
455 Assign Cookies Go 54.8% easy Greedy
452 Minimum Number of Arrows to Burst Balloons Go 50.7% medium Greedy
451 Sort Characters By Frequency Go 64.2% medium HeapHash Table
448 Find All Numbers Disappeared in an Array Go 58.9% easy Array
438 Find All Anagrams in a String❤️ Go 44.8% medium Hash Table
437 Path Sum III❤️ Go 55.3% easy Tree
435 Non-overlapping Intervals Go 45.7% medium Greedy
416 Partition Equal Subset Sum❤️ Go 48.2% medium Dynamic Programming
406 Queue Reconstruction by Height Go 65.3% medium Greedy
404 Sum of Left Leaves Go 54.9% easy Tree
399 Evaluate Division Go 54.2% medium Union FindGraph
395 Longest Substring with At Least K Repeating Characters❤️ Go 43.3% medium
394 Decode String❤️ Go 52.7% medium StackDepth-first Search
392 Is Subsequence Go 49.0% easy GreedyBinary SearchDynamic Programming
387 First Unique Character in a String Go 45.6% easy Hash TableString
347 Top K Frequent Elements Go 60.7% medium HeapHash Table
345 Reverse Vowels of a String Go 50.2% easy Two PointersString
344 Reverse String Go 70.6% easy Two PointersString
338 Counting Bits Go 75.2% medium Bit ManipulationDynamic Programming
337 House Robber III Go 57.5% medium TreeDepth-first Search
328 Odd Even Linked List Go 62.8% medium Linked List
326 Power of Three Go 46.9% easy Math
322 Coin Change Go 40.2% medium Dynamic Programming
309 Best Time to Buy and Sell Stock with Cooldown Go 54.1% medium Dynamic Programming
303 Range Sum Query - Immutable Go 61.9% easy Dynamic Programming
300 Longest Increasing Subsequence❤️ Go 44.7% medium Binary SearchDynamic Programming
287 Find the Duplicate Number Go 65.7% medium ArrayTwo PointersBinary Search
283 Move Zeroes Go 61.4% easy ArrayTwo Pointers
279 Perfect Squares Go 56.7% medium Breadth-first SearchMathDynamic Programming
278 First Bad Version Java 39.3% easy Binary Search
268 Missing Number Go 56.1% easy Bit ManipulationArrayMath
242 Valid Anagram Go 60.4% easy SortHash Table
241 Different Ways to Add Parentheses Go 71.9% medium Divide and Conquer
240 Search a 2D Matrix II Go 41.1% medium Binary SearchDivide and Conquer
238 Product of Array Except Self Go 70.3% medium Array
237 Delete Node in a Linked List Go 81.9% easy Linked List
236 Lowest Common Ancestor of a Binary Tree Go 64.2% medium Tree
234 Palindrome Linked List Go 42.3% easy Linked ListTwo Pointers
232 Implement Queue using Stacks Go 64.3% easy StackDesign
230 Kth Smallest Element in a BST Go 70.8% medium TreeBinary Search
226 Invert Binary Tree Go 75.6% easy Tree
225 Implement Stack using Queues Go 65.0% easy StackDesign
221 Maximal Square Go 42.6% medium Dynamic Programming
218 The Skyline Problem❤️ Go 42.6% hard HeapBinary Indexed TreeSegment TreeDivide and ConquerLine Sweep
215 Kth Largest Element in an Array Go 64.4% medium HeapDivide and Conquer
212 Word Search II Go 41.4% hard TrieBacktracking
210 Course Schedule II Go 50.7% medium Depth-first SearchBreadth-first SearchGraphTopological Sort
208 Implement Trie (Prefix Tree)❤️ Go 67.6% medium DesignTrie
207 Course Schedule Go 51.7% medium Depth-first SearchBreadth-first SearchGraphTopological Sort
206 Reverse Linked List Go 69.6% easy Linked List
204 Count Primes Go 34.2% easy Hash TableMath
200 Number of Islands Go 49.7% medium Depth-first SearchBreadth-first SearchUnion Find
198 House Robber❤️ Go 45.8% easy Dynamic Programming
191 Number of 1 Bits Go 68.0% easy Bit Manipulation
190 Reverse Bits Go 59.4% easy Bit Manipulation
172 Factorial Trailing Zeroes Go 40.0% easy Math
169 Majority Element Go 63.7% easy Bit ManipulationArrayDivide and Conquer
167 Two Sum II - Input array is sorted Go 54.6% easy ArrayTwo PointersBinary Search
166 Fraction to Recurring Decimal Go 26.7% medium Hash TableMath
160 Intersection of Two Linked Lists Go 55.4% easy Linked List
155 Min Stack Go 54.7% easy StackDesign
153 Find Minimum in Rotated Sorted Array Go 51.0% medium ArrayBinary Search
152 Maximum Product Subarray Go 39.8% medium ArrayDynamic Programming
149 Max Points on a Line❤️ Go 22.6% hard Hash TableMath
148 Sort List Go 65.9% medium SortLinked List
146 LRU Cache❤️ Go 49.7% medium Design
145 Binary Tree Postorder Traversal Go 71.8% hard StackTree
144 Binary Tree Preorder Traversal Go 65.9% medium StackTree
142 Linked List Cycle II Go 50.8% medium Linked ListTwo Pointers
141 Linked List Cycle Go 48.4% easy Linked ListTwo Pointers
140 Word Break II Go 38.2% hard Dynamic ProgrammingBacktracking
139 Word Break❤️ Go 46.5% medium Dynamic Programming
136 Single Number Go 69.1% easy Bit ManipulationHash Table
131 Palindrome Partitioning Go 68.1% medium Backtracking
130 Surrounded Regions Go 40.3% medium Depth-first SearchBreadth-first SearchUnion Find
127 Word Ladder Go 42.6% medium Breadth-first Search
125 Valid Palindrome Go 45.7% easy Two PointersString
122 Best Time to Buy and Sell Stock II Go 61.0% easy GreedyArray
121 Best Time to Buy and Sell Stock❤️ Go 54.3% easy ArrayDynamic Programming
114 Flatten Binary Tree to Linked List Go 69.3% medium TreeDepth-first Search
112 Path Sum Go 49.9% easy TreeDepth-first Search
111 Minimum Depth of Binary Tree Go 42.8% easy TreeDepth-first SearchBreadth-first Search
110 Balanced Binary Tree Go 52.3% easy TreeDepth-first Search
105 Construct Binary Tree from Preorder and Inorder Traversal Go 67.3% medium TreeDepth-first SearchArray
104 Maximum Depth of Binary Tree❤️ Go 73.6% easy TreeDepth-first Search
103 Binary Tree Zigzag Level Order Traversal Go 54.6% medium StackTreeBreadth-first Search
102 Binary Tree Level Order Traversal Go 63.0% medium TreeBreadth-first Search
101 Symmetric Tree❤️ Go 52.3% easy TreeDepth-first SearchBreadth-first Search
98 Validate Binary Search Tree❤️ Go 31.6% medium TreeDepth-first Search
96 Unique Binary Search Trees❤️ Go 66.0% medium TreeDynamic Programming
95 Unique Binary Search Trees II Go 63.3% medium TreeDynamic Programming
94 Binary Tree Inorder Traversal Go 71.9% medium StackTreeHash Table
88 Merge Sorted Array Go 48.0% easy ArrayTwo Pointers
83 Remove Duplicates from Sorted List Go 50.7% easy Linked List
79 Word Search Go 41.9% medium ArrayBacktracking
78 Subsets Go 77.5% medium Bit ManipulationArrayBacktracking
75 Sort Colors❤️ Go 55.1% medium SortArrayTwo Pointers
70 Climbing Stairs❤️ Go 49.9% easy Dynamic Programming
69 Sqrt(x) Go 38.8% easy MathBinary Search
64 Minimum Path Sum Go 65.9% medium ArrayDynamic Programming
62 Unique Paths Go 60.8% medium ArrayDynamic Programming
56 Merge Intervals Go 42.7% medium SortArray
55 Jump Game❤️ Go 40.4% medium GreedyArray
53 Maximum Subarray❤️ Go 51.6% easy ArrayDivide and ConquerDynamic Programming
49 Group Anagrams Go 62.3% medium Hash TableString
48 Rotate Image Go 68.7% medium Array
46 Permutations❤️ Go 76.3% medium Backtracking
39 Combination Sum❤️ Go 69.1% medium ArrayBacktracking
34 Find First and Last Position of Element in Sorted Array Go 39.8% medium ArrayBinary Search
33 Search in Rotated Sorted Array Go 38.2% medium ArrayBinary Search
31 Next Permutation❤️ Go 34.0% medium Array
22 Generate Parentheses Go 75.7% medium StringBacktracking
21 Merge Two Sorted Lists Go 63.1% easy Linked List
20 Valid Parentheses❤️ Go 41.9% easy StackString
19 Remove Nth Node From End of List❤️ Go 38.9% medium Linked ListTwo Pointers
17 Letter Combinations of a Phone Number❤️ Go 53.8% medium StringBacktracking
15 3Sum❤️ Go 28.4% medium ArrayTwo Pointers
11 Container With Most Water❤️ Go 63.6% medium ArrayTwo Pointers
5 Longest Palindromic Substring❤️ Go 30.9% medium StringDynamic Programming
3 Longest Substring Without Repeating Characters Go 34.9% medium Hash TableTwo PointersStringSliding Window
2 Add Two Numbers Go 37.7% medium Linked ListMath
1 Two Sum Go 48.9% easy ArrayHash Table