Skip to content
This repository was archived by the owner on Sep 9, 2021. It is now read-only.

Singularity0909/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2020.11.09 第三次被封号,不能再爬虫了 ==

| English | 简体中文 |

My LeetCode Solutions


Last updated: 2020-11-09 15:16:53

The source code is fetched using the tool LeetCode_Helper.

# Title Solutions Acceptance Difficulty Tags
LCP 22 黑白方格画 C++ 29.7% easy
LCP 24 数字游戏❤️ C++ 21.5% hard
LCP 19 秋叶收藏集 C++ 51.6% medium
LCP 13 寻宝 C++ 62.3% hard
面试题 17.13 Re-Space LCCI C++ 55.9% medium Memoization
String
面试题 16.11 Diving Board LCCI C++ 44.2% easy Recursion
Memoization
剑指 Offer 64 求1+2+…+n LCOF C++ 85.1% medium
剑指 Offer 63 股票的最大利润 LCOF C++ 63.3% medium Dynamic Programming
剑指 Offer 62 圆圈中最后剩下的数字 LCOF C++ 63.4% easy
剑指 Offer 55 - II 平衡二叉树 LCOF C++ 57.9% easy Tree
Depth-first Search
剑指 Offer 61 扑克牌中的顺子 LCOF C++ 44.9% easy
剑指 Offer 59 - II 队列的最大值 LCOF C++ 47.5% medium Stack
Sliding Window
剑指 Offer 59 - I 滑动窗口的最大值 LCOF C++ 44.1% easy Queue
Sliding Window
剑指 Offer 49 丑数 LCOF C++ 64.6% medium Math
剑指 Offer 54 二叉搜索树的第k大节点 LCOF C++ 74.0% easy Tree
剑指 Offer 58 - II 左旋转字符串 LCOF C++ 85.3% easy String
剑指 Offer 58 - I 翻转单词顺序 LCOF C++ 42.8% easy String
剑指 Offer 47 礼物的最大价值 LCOF C++ 67.9% medium Dynamic Programming
剑指 Offer 46 把数字翻译成字符串 LCOF C++ 53.9% medium
剑指 Offer 57 - II 和为s的连续正数序列 LCOF C++ 69.1% easy
剑指 Offer 45 把数组排成最小的数 LCOF C++ 56.0% medium Sort
剑指 Offer 57 和为s的两个数字 LCOF C++ 65.5% easy
剑指 Offer 56 - II 数组中数字出现的次数 II LCOF C++ 79.2% medium
剑指 Offer 56 - I 数组中数字出现的次数 LCOF C++ 70.9% medium
剑指 Offer 55 - I 二叉树的深度 LCOF C++ 78.8% easy Tree
Depth-first Search
剑指 Offer 51 数组中的逆序对 LCOF❤️ C++ 46.0% hard
剑指 Offer 34 二叉树中和为某一值的路径 LCOF C++ 57.3% medium Tree
Depth-first Search
剑指 Offer 50 第一个只出现一次的字符 LCOF C++ 60.0% easy Hash Table
剑指 Offer 33 二叉搜索树的后序遍历序列 LCOF C++ 52.9% medium
剑指 Offer 32 - III 从上到下打印二叉树 III LCOF C++ 58.4% medium Tree
Breadth-first Search
剑指 Offer 44 数字序列中某一位的数字 LCOF C++ 39.6% medium Math
剑指 Offer 32 - II 从上到下打印二叉树 II LCOF C++ 68.6% easy Tree
Breadth-first Search
剑指 Offer 32 - I 从上到下打印二叉树 LCOF C++ 64.5% medium Tree
Breadth-first Search
剑指 Offer 39 数组中出现次数超过一半的数字 LCOF C++ 67.8% easy Bit Manipulation
Divide and Conquer
剑指 Offer 38 字符串的排列 LCOF C++ 54.6% medium Backtracking
剑指 Offer 37 序列化二叉树 LCOF C++ 52.4% hard Tree
Design
剑指 Offer 31 栈的压入、弹出序列 LCOF C++ 59.6% medium
剑指 Offer 42 连续子数组的最大和 LCOF C++ 59.7% easy Divide and Conquer
Dynamic Programming
剑指 Offer 41 数据流中的中位数 LCOF C++ 56.3% hard Heap
Design
剑指 Offer 30 包含min函数的栈 LCOF C++ 57.3% easy Stack
Design
剑指 Offer 40 最小的k个数 LCOF C++ 56.8% easy Heap
Divide and Conquer
剑指 Offer 35 复杂链表的复制 LCOF C++ 71.7% medium Linked List
剑指 Offer 18 删除链表的节点 LCOF C++ 58.7% easy Linked List
剑指 Offer 24 反转链表 LCOF C++ 74.3% easy Linked List
剑指 Offer 19 正则表达式匹配 LCOF C++ 35.6% hard Dynamic Programming
剑指 Offer 17 打印从1到最大的n位数 LCOF C++ 78.3% easy Math
剑指 Offer 16 数值的整数次方 LCOF C++ 33.2% medium Recursion
剑指 Offer 22 链表中倒数第k个节点 LCOF C++ 78.5% easy Linked List
Two Pointers
剑指 Offer 29 顺时针打印矩阵 LCOF C++ 44.4% easy Array
剑指 Offer 15 二进制中1的个数 LCOF C++ 72.9% easy Bit Manipulation
剑指 Offer 21 调整数组顺序使奇数位于偶数前面 LCOF C++ 64.2% easy
剑指 Offer 20 表示数值的字符串 LCOF C++ 23.1% medium Math
剑指 Offer 28 对称的二叉树 LCOF C++ 57.8% easy Tree
剑指 Offer 27 二叉树的镜像 LCOF C++ 78.7% easy Tree
剑指 Offer 26 树的子结构 LCOF C++ 45.9% medium Tree
剑指 Offer 25 合并两个排序的链表 LCOF C++ 73.3% easy Divide and Conquer
剑指 Offer 14- II 剪绳子 II LCOF C++ 29.9% medium Math
Dynamic Programming
剑指 Offer 14- I 剪绳子 LCOF C++ 55.4% medium Math
Dynamic Programming
剑指 Offer 07 重建二叉树 LCOF C++ 68.7% medium Tree
Recursion
剑指 Offer 06 从尾到头打印链表 LCOF C++ 75.2% easy Linked List
剑指 Offer 13 机器人的运动范围 LCOF C++ 50.5% medium
剑指 Offer 05 替换空格 LCOF C++ 75.8% easy
剑指 Offer 12 矩阵中的路径 LCOF C++ 44.8% medium Depth-first Search
剑指 Offer 11 旋转数组的最小数字 LCOF C++ 49.4% easy Binary Search
剑指 Offer 10- II 青蛙跳台阶问题 LCOF C++ 42.4% easy Recursion
面试题4 二维数组中的查找 LCOF C++ 41.1% medium Array
Two Pointers
剑指 Offer 03 数组中重复的数字 LCOF C++ 67.3% easy Array
Hash Table
剑指 Offer 10- I 斐波那契数列 LCOF C++ 33.6% easy Recursion
剑指 Offer 09 用两个栈实现队列 LCOF C++ 72.7% easy Stack
Design
面试题 08.03 Magic Index LCCI C++ 68.3% easy Array
Binary Search
1649 Create Sorted Array through Instructions C++ 42.0% hard Binary Indexed Tree
Segment Tree
Ordered Map
1648 Sell Diminishing-Valued Colored Balls C++ 24.0% medium Greedy
Sort
Math
1647 Minimum Deletions to Make Character Frequencies Unique C++ 47.5% medium Greedy
Sort
1646 Get Maximum in Generated Array C++ 49.4% easy Array
1617 Count Subtrees With Max Distance Between Cities C++ 58.6% hard Backtracking
1616 Split Two Strings to Make Palindrome❤️ C++ 26.7% medium Greedy
Two Pointers
String
1615 Maximal Network Rank C++ 47.8% medium Graph
1614 Maximum Nesting Depth of the Parentheses C++ 82.3% easy String
1610 Maximum Number of Visible Points C++ 24.7% hard Geometry
Two Pointers
1611 Minimum One Bit Operations to Make Integers Zero C++ 57.3% hard Bit Manipulation
Dynamic Programming
1609 Even Odd Tree C++ 53.0% medium Tree
1608 Special Array With X Elements Greater Than or Equal X C++ 65.4% easy Array
1622 Fancy Sequence❤️ C++ 15.3% hard Design
Math
1620 Coordinate With Maximum Network Quality C++ 36.6% medium Greedy
1601 Maximum Number of Achievable Transfer Requests C++ 47.1% hard Dynamic Programming
1600 Throne Inheritance C++ 48.1% medium Tree
Design
1599 Maximum Profit of Operating a Centennial Wheel C++ 41.2% medium Greedy
1598 Crawler Log Folder C++ 67.8% easy Stack
1594 Maximum Non Negative Product in a Matrix C++ 29.4% medium Greedy
Dynamic Programming
1593 Split a String Into the Max Number of Unique Substrings C++ 46.6% medium Backtracking
1592 Rearrange Spaces Between Words C++
Python3
44.9% easy String
1605 Find Valid Matrix Given Row and Column Sums C++ 69.8% medium Greedy
1606 Find Servers That Handled Most Number of Requests❤️ C++ 30.5% hard Ordered Map
1604 Alert Using Same Key-Card Three or More Times in a One Hour Period C++ 40.3% medium String
Ordered Map
1603 Design Parking System C++ 84.9% easy Design
1579 Remove Max Number of Edges to Keep Graph Fully Traversable C++ 44.9% hard Union Find
1578 Minimum Deletion Cost to Avoid Repeating Letters C++ 59.1% medium Greedy
1577 Number of Ways Where Square of Number Is Equal to Product of Two Numbers C++ 30.9% medium Hash Table
Math
1576 Replace All ?'s to Avoid Consecutive Repeating Characters C++ 48.1% easy String
1537 Get the Maximum Score C++ 35.2% hard Dynamic Programming
1536 Minimum Swaps to Arrange a Binary Grid C++ 41.7% medium Greedy
1535 Find the Winner of an Array Game C++ 43.9% medium Array
1534 Count Good Triplets C++ 78.2% easy Array
1530 Number of Good Leaf Nodes Pairs C++ 53.3% medium Tree
Depth-first Search
1529 Bulb Switcher IV C++ 67.4% medium String
1528 Shuffle String C++ 79.3% easy Sort
1521 Find a Value of a Mysterious Function Closest to Target❤️ C++ 38.2% hard Bit Manipulation
Segment Tree
Binary Search
1520 Maximum Number of Non-Overlapping Substrings❤️ C++ 31.3% hard Greedy
1519 Number of Nodes in the Sub-Tree With the Same Label C++ 27.7% medium Depth-first Search
Breadth-first Search
1518 Water Bottles C++ 68.2% easy Greedy
1526 Minimum Number of Increments on Subarrays to Form a Target Array C++ 59.1% hard Segment Tree
1525 Number of Good Ways to Split a String C++ 66.7% medium Bit Manipulation
String
1524 Number of Sub-arrays With Odd Sum C++ 38.7% medium Array
Math
1523 Count Odd Numbers in an Interval Range C++ 57.0% easy Math
1365 How Many Numbers Are Smaller Than the Current Number C++ 82.6% easy Array
Hash Table
1356 Sort Integers by The Number of 1 Bits C++ 73.5% easy Sort
Bit Manipulation
1321 Restaurant Growth🔒 SQL 59.3% medium
1308 Running Total for Different Genders🔒 SQL 74.4% medium
1310 XOR Queries of a Subarray C++ 65.1% medium Bit Manipulation
1264 Page Recommendations🔒 SQL 59.8% medium
1241 Number of Comments per Post🔒 SQL 59.7% easy
1204 Last Person to Fit in the Elevator🔒 SQL 71.2% medium
1207 Unique Number of Occurrences C++ 73.3% easy Hash Table
1173 Immediate Food Delivery I🔒 SQL 76.0% easy
1164 Product Price at a Given Date🔒 SQL 61.6% medium
1158 Market Analysis I🔒 SQL 55.5% medium
1149 Article Views II🔒 SQL 44.7% medium
1148 Article Views I🔒 SQL 73.3% easy
1142 User Activity for the Past 30 Days II🔒 SQL 37.5% easy
1141 User Activity for the Past 30 Days I🔒 SQL 52.5% easy
1132 Reported Posts II🔒 SQL 39.9% medium
1126 Active Businesses🔒 SQL 68.6% medium
1113 Reported Posts🔒 SQL 54.0% easy
1112 Highest Grade For Each Student🔒 SQL 61.3% medium
1286 Iterator for Combination C++ 62.4% medium Design
Backtracking
1619 Mean of Array After Removing Some Elements C++ 72.2% easy Array
1107 New Users Daily Count🔒 SQL 40.8% medium
1098 Unpopular Books🔒 SQL 46.9% medium
550 Game Play Analysis IV🔒 SQL 44.9% medium
534 Game Play Analysis III🔒 SQL 66.7% medium
512 Game Play Analysis II🔒 SQL 53.1% easy
511 Game Play Analysis I🔒 SQL 73.6% easy
1084 Sales Analysis III🔒 SQL 53.9% easy
1083 Sales Analysis II🔒 SQL 52.2% easy
1082 Sales Analysis I🔒 SQL 75.6% easy
1091 Shortest Path in Binary Matrix C++ 35.5% medium Breadth-first Search
1077 Project Employees III🔒 SQL 70.9% medium
1076 Project Employees II🔒 SQL 51.1% easy
1075 Project Employees I🔒 SQL 67.5% easy
1069 Product Sales Analysis II🔒 SQL 82.1% easy
1068 Product Sales Analysis I🔒 SQL 86.3% easy
1050 Actors and Directors Who Cooperated At Least Three Times🔒 SQL 76.0% easy
1045 Customers Who Bought All Products🔒 SQL 65.2% medium
1038 Binary Search Tree to Greater Sum Tree C++ 77.9% medium Binary Search Tree
1025 Divisor Game C++ 71.6% easy Math
Dynamic Programming
1024 Video Stitching C++ 57.2% medium Dynamic Programming
1002 Find Common Characters C++
Python3
74.4% easy Array
Hash Table
977 Squares of a Sorted Array C++ 73.6% easy Array
Two Pointers
973 K Closest Points to Origin C++ 62.8% medium Heap
Sort
Divide and Conquer
509 Fibonacci Number C++ 66.2% easy Array
968 Binary Tree Cameras❤️ C++ 48.9% hard Tree
Depth-first Search
Dynamic Programming
946 Validate Stack Sequences C++ 60.0% medium Stack
941 Valid Mountain Array C++ 39.3% easy Array
925 Long Pressed Name C++ 39.4% easy Two Pointers
String
912 Sort an Array C++ 59.5% medium
901 Online Stock Span❤️ C++ 49.3% medium Stack
845 Longest Mountain in Array C++ 41.6% medium Two Pointers
844 Backspace String Compare C++ 52.2% easy Stack
Two Pointers
841 Keys and Rooms C++ 65.4% medium Depth-first Search
Graph
836 Rectangle Overlap C++ 49.8% easy Math
834 Sum of Distances in Tree C++ 53.5% hard Tree
Depth-first Search
792 Number of Matching Subsequences C++ 42.9% medium Array
785 Is Graph Bipartite? C++ 50.0% medium Depth-first Search
Breadth-first Search
Graph
783 Minimum Distance Between BST Nodes C++ 55.6% easy Tree
Recursion
701 Insert into a Binary Search Tree C++ 72.0% medium Tree
771 Jewels and Stones C++ 84.9% easy Hash Table
763 Partition Labels❤️ C++ 76.5% medium Greedy
Two Pointers
739 Daily Temperatures C++ 65.2% medium Stack
Hash Table
733 Flood Fill C++ 57.9% easy Depth-first Search
718 Maximum Length of Repeated Subarray C++ 54.4% medium Array
Hash Table
Binary Search
Dynamic Programming
714 Best Time to Buy and Sell Stock with Transaction Fee C++ 69.0% medium Greedy
Array
Dynamic Programming
696 Count Binary Substrings C++ 62.3% easy String
685 Redundant Connection II C++ 44.7% hard Tree
Depth-first Search
Union Find
Graph
684 Redundant Connection C++ 61.7% medium Tree
Union Find
Graph
679 24 Game C++ 54.7% hard Depth-first Search
657 Robot Return to Origin C++ 77.9% easy String
647 Palindromic Substrings C++ 64.5% medium String
Dynamic Programming
637 Average of Levels in Binary Tree C++ 68.7% easy Tree
632 Smallest Range Covering Elements from K Lists C++ 58.8% hard Hash Table
Two Pointers
String
620 Not Boring Movies SQL 76.6% easy
619 Biggest Single Number🔒 SQL 47.7% easy
617 Merge Two Binary Trees C++ 78.4% easy Tree
614 Second Degree Follower🔒 SQL 34.2% medium
613 Shortest Distance in a Line🔒 SQL 82.0% easy
612 Shortest Distance in a Plane🔒 SQL 65.9% medium
610 Triangle Judgement🔒 SQL 66.9% easy
608 Tree Node🔒 SQL 67.8% medium
607 Sales Person🔒 SQL 67.4% easy
603 Consecutive Available Seats🔒 SQL 68.0% easy
602 Friend Requests II: Who Has the Most Friends🔒 SQL 62.8% medium
597 Friend Requests I: Overall Acceptance Rate🔒 SQL 45.8% easy
586 Customer Placing the Largest Number of Orders🔒 SQL 75.6% easy
585 Investments in 2016🔒 SQL 58.6% medium
584 Find Customer Referee🔒 SQL 77.5% easy
580 Count Student Number in Departments🔒 SQL 52.6% medium
578 Get Highest Answer Rate Question🔒 SQL 50.8% medium
577 Employee Bonus🔒 SQL 71.5% easy
574 Winning Candidate🔒 SQL 63.4% medium
570 Managers with at Least 5 Direct Reports🔒 SQL 67.6% medium
557 Reverse Words in a String III C++ 73.5% easy String
546 Remove Boxes C++ 64.4% hard Depth-first Search
Dynamic Programming
538 Convert BST to Greater Tree C++ 63.9% medium Tree
530 Minimum Absolute Difference in BST C++ 60.7% easy Tree
529 Minesweeper C++ 65.4% medium Depth-first Search
Breadth-first Search
503 Next Greater Element II C++ 57.9% medium Stack
501 Find Mode in Binary Search Tree C++ 49.6% easy Tree
496 Next Greater Element I C++ 65.9% easy Stack
491 Increasing Subsequences C++ 55.9% medium Depth-first Search
486 Predict the Winner C++ 58.7% medium Minimax
Dynamic Programming
463 Island Perimeter C++ 71.5% easy Hash Table
459 Repeated Substring Pattern C++ 51.2% easy String
445 Add Two Numbers II C++ 58.1% medium Linked List
437 Path Sum III C++ 56.2% medium Tree
416 Partition Equal Subset Sum C++ 49.0% medium Dynamic Programming
415 Add Strings C++ 51.9% easy String
410 Split Array Largest Sum C++ 53.3% hard Binary Search
Dynamic Programming
404 Sum of Left Leaves C++ 56.3% easy Tree
400 Nth Digit C++ 38.5% medium Math
392 Is Subsequence C++ 50.6% easy Greedy
Binary Search
Dynamic Programming
381 Insert Delete GetRandom O(1) - Duplicates allowed C++ 45.0% hard Design
Array
Hash Table
378 Kth Smallest Element in a Sorted Matrix❤️ C++ 62.9% medium Heap
Binary Search
365 Water and Jug Problem C++ 35.3% medium Math
350 Intersection of Two Arrays II C++ 53.2% easy Sort
Hash Table
Two Pointers
Binary Search
349 Intersection of Two Arrays C++ 73.2% easy Sort
Hash Table
Two Pointers
Binary Search
347 Top K Frequent Elements C++ 61.8% medium Heap
Hash Table
344 Reverse String C++ 73.6% easy Two Pointers
String
343 Integer Break C++ 58.8% medium Math
Dynamic Programming
337 House Robber III C++ 60.6% medium Tree
Depth-first Search
336 Palindrome Pairs C++ 39.7% hard Trie
Hash Table
String
332 Reconstruct Itinerary C++ 43.9% medium Depth-first Search
Graph
329 Longest Increasing Path in a Matrix C++ 46.2% hard Depth-first Search
Topological Sort
Memoization
327 Count of Range Sum❤️ C++ 42.4% hard Sort
Binary Indexed Tree
Segment Tree
Binary Search
Divide and Conquer
315 Count of Smaller Numbers After Self C++ 41.6% hard Sort
Binary Indexed Tree
Segment Tree
Binary Search
Divide and Conquer
312 Burst Balloons C++ 67.2% hard Divide and Conquer
Dynamic Programming
309 Best Time to Buy and Sell Stock with Cooldown C++ 57.2% medium Dynamic Programming
300 Longest Increasing Subsequence C++ 45.3% medium Binary Search
Dynamic Programming
297 Serialize and Deserialize Binary Tree C++ 52.5% hard Tree
Design
295 Find Median from Data Stream C++ 49.0% hard Heap
Design
264 Ugly Number II C++ 54.5% medium Heap
Math
Dynamic Programming
260 Single Number III C++ 74.0% medium Bit Manipulation
257 Binary Tree Paths C++ 66.2% easy Tree
Depth-first Search
240 Search a 2D Matrix II C++ 42.4% medium Binary Search
Divide and Conquer
239 Sliding Window Maximum❤️ C++ 49.2% hard Heap
Sliding Window
235 Lowest Common Ancestor of a Binary Search Tree C++ 65.9% easy Tree
234 Palindrome Linked List C++ 44.9% easy Linked List
Two Pointers
226 Invert Binary Tree C++ 77.5% easy Tree
216 Combination Sum III C++ 73.5% medium Array
Backtracking
214 Shortest Palindrome C++ 36.5% hard String
210 Course Schedule II C++ 52.1% medium Depth-first Search
Breadth-first Search
Graph
Topological Sort
207 Course Schedule C++ 54.4% medium Depth-first Search
Breadth-first Search
Graph
Topological Sort
206 Reverse Linked List C++ 70.9% easy Linked List
201 Bitwise AND of Numbers Range C++ 51.2% medium Bit Manipulation
191 Number of 1 Bits C++ 70.3% easy Bit Manipulation
188 Best Time to Buy and Sell Stock IV C++ 30.2% hard Dynamic Programming
175 Combine Two Tables SQL 73.6% easy
174 Dungeon Game C++ 48.1% hard Binary Search
Dynamic Programming
169 Majority Element C++ 64.9% easy Bit Manipulation
Array
Divide and Conquer
167 Two Sum II - Input array is sorted C++ 56.8% easy Array
Two Pointers
Binary Search
159 Longest Substring with At Most Two Distinct Characters🔒❤️ C++ 52.2% medium Hash Table
Two Pointers
String
Sliding Window
155 Min Stack C++ 55.6% easy Stack
Design
154 Find Minimum in Rotated Sorted Array II C++ 50.5% hard Array
Binary Search
153 Find Minimum in Rotated Sorted Array C++ 51.8% medium Array
Binary Search
150 Evaluate Reverse Polish Notation C++ 50.6% medium Stack
145 Binary Tree Postorder Traversal C++ 73.5% medium Stack
Tree
144 Binary Tree Preorder Traversal C++ 68.4% medium Stack
Tree
143 Reorder List C++ 59.6% medium Linked List
142 Linked List Cycle II C++ 53.9% medium Linked List
Two Pointers
141 Linked List Cycle C++ 50.3% easy Linked List
Two Pointers
140 Word Break II❤️ C++ 43.9% hard Dynamic Programming
Backtracking
139 Word Break C++ 48.4% medium Dynamic Programming
137 Single Number II C++ 68.2% medium Bit Manipulation
136 Single Number C++ 70.2% easy Bit Manipulation
Hash Table
133 Clone Graph C++ 65.3% medium Depth-first Search
Breadth-first Search
Graph
130 Surrounded Regions C++ 42.3% medium Depth-first Search
Breadth-first Search
Union Find
129 Sum Root to Leaf Numbers C++ 66.3% medium Tree
Depth-first Search
127 Word Ladder C++ 45.4% medium Breadth-first Search
123 Best Time to Buy and Sell Stock III C++ 46.4% hard Array
Dynamic Programming
122 Best Time to Buy and Sell Stock II C++ 64.9% easy Greedy
Array
121 Best Time to Buy and Sell Stock C++ 55.1% easy Array
Dynamic Programming
120 Triangle C++ 66.8% medium Array
Dynamic Programming
117 Populating Next Right Pointers in Each Node II C++ 59.0% medium Tree
Depth-first Search
116 Populating Next Right Pointers in Each Node C++ 67.7% medium Tree
Depth-first Search
Breadth-first Search
114 Flatten Binary Tree to Linked List C++ 71.3% medium Tree
Depth-first Search
113 Path Sum II C++ 61.1% medium Tree
Depth-first Search
112 Path Sum C++ 51.4% easy Tree
Depth-first Search
111 Minimum Depth of Binary Tree C++ 45.0% easy Tree
Depth-first Search
Breadth-first Search
110 Balanced Binary Tree C++ 54.8% easy Tree
Depth-first Search
109 Convert Sorted List to Binary Search Tree C++ 76.0% medium Depth-first Search
Linked List
108 Convert Sorted Array to Binary Search Tree C++ 74.4% easy Tree
Depth-first Search
107 Binary Tree Level Order Traversal II C++ 67.7% easy Tree
Breadth-first Search
106 Construct Binary Tree from Inorder and Postorder Traversal C++ 70.7% medium Tree
Depth-first Search
Array
105 Construct Binary Tree from Preorder and Inorder Traversal C++ 68.5% medium Tree
Depth-first Search
Array
104 Maximum Depth of Binary Tree C++ 75.3% easy Tree
Depth-first Search
101 Symmetric Tree C++ 53.1% easy Tree
Depth-first Search
Breadth-first Search
100 Same Tree C++ 60.2% easy Tree
Depth-first Search
99 Recover Binary Search Tree C++ 62.0% hard Tree
Depth-first Search
97 Interleaving String C++ 45.5% hard String
Dynamic Programming
96 Unique Binary Search Trees C++ 69.2% medium Tree
Dynamic Programming
95 Unique Binary Search Trees II C++ 66.8% medium Tree
Dynamic Programming
94 Binary Tree Inorder Traversal C++ 74.1% medium Stack
Tree
Hash Table
93 Restore IP Addresses C++ 50.5% medium String
Backtracking
90 Subsets II C++ 61.4% medium Array
Backtracking
79 Word Search C++ 43.7% medium Array
Backtracking
78 Subsets C
C++
79.2% medium Bit Manipulation
Array
Backtracking
77 Combinations C++ 75.9% medium Backtracking
75 Sort Colors C++ 56.8% medium Sort
Array
Two Pointers
71 Simplify Path C++ 40.9% medium Stack
String
70 Climbing Stairs C++ 50.8% easy Dynamic Programming
65 Valid Number C++ 21.1% hard Math
String
64 Minimum Path Sum C++ 67.7% medium Array
Dynamic Programming
63 Unique Paths II C++ 37.0% medium Array
Dynamic Programming
62 Unique Paths C++ 62.7% medium Array
Dynamic Programming
60 Permutation Sequence C++ 51.6% hard Math
Backtracking
57 Insert Interval C++ 39.8% hard Sort
Array
54 Spiral Matrix C++ 41.4% medium Array
53 Maximum Subarray C++ 52.7% easy Array
Divide and Conquer
Dynamic Programming
52 N-Queens II C++ 82.1% hard Backtracking
51 N-Queens❤️ C++ 73.3% hard Backtracking
50 Pow(x, n) C++ 36.9% medium Math
Binary Search
47 Permutations II C++ 62.2% medium Backtracking
46 Permutations C++ 77.1% medium Backtracking
44 Wildcard Matching C++ 31.5% hard Greedy
String
Dynamic Programming
Backtracking
43 Multiply Strings C++ 44.5% medium Math
String
42 Trapping Rain Water❤️ C++ 53.0% hard Stack
Array
Two Pointers
40 Combination Sum II C++ 64.5% medium Array
Backtracking
39 Combination Sum C++ 71.6% medium Array
Backtracking
37 Sudoku Solver C++ 66.7% hard Hash Table
Backtracking
35 Search Insert Position C++ 46.8% easy Array
Binary Search
32 Longest Valid Parentheses C++ 34.0% hard String
Dynamic Programming
24 Swap Nodes in Pairs C++ 68.4% medium Linked List
21 Merge Two Sorted Lists C++ 64.6% easy Linked List
20 Valid Parentheses C++ 43.2% easy Stack
String
19 Remove Nth Node From End of List C++ 40.5% medium Linked List
Two Pointers
18 4Sum C++ 39.3% medium Array
Hash Table
Two Pointers
17 Letter Combinations of a Phone Number C++ 55.5% medium String
Backtracking
11 Container With Most Water C++ 64.4% medium Array
Two Pointers
10 Regular Expression Matching C++ 30.4% hard String
Dynamic Programming
Backtracking
5 Longest Palindromic Substring C++ 32.3% medium String
Dynamic Programming
3 Longest Substring Without Repeating Characters C++ 35.8% medium Hash Table
Two Pointers
String
Sliding Window
2 Add Two Numbers C++ 38.9% medium Linked List
Math
1 Two Sum C++ 49.7% easy Array
Hash Table

About

My solutions to LeetCode problems

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages