-
- Easy
- Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3.4 MB, less than 46.15%
- v3 solution
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3.3 MB, less than 53.85%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 99.27%
- Memory Usage: 5 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3.3 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 91.56%
- Memory Usage: 3 MB, less than 85.71%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
33. Search in Rotated Sorted Array
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.6 MB, less than 50.00% (This must be the best score)
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 86.34%
- Memory Usage: 3.1 MB, less than 100.00%
-
- Hard
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 97.20%
- Memory Usage: 3.3 MB, less than 100.00%
-
- Hard
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.7 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 98.96%
-
96. Unique Binary Search Trees
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 91.07%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.1 MB, less than 100.00%
-
107. Binary Tree Level Order Traversal II
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3 MB, less than 43.48%
- Efficient enough as DFS solution, less memory usage solutions are using BFS
-
111. Minimum Depth of Binary Tree
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 96.23%
- Memory Usage: 5.2 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 4.6 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.3 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
121. Best Time to Buy and Sell Stock
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 96.24%
- Memory Usage: 3.1 MB, less than 100.00%
-
122. Best Time to Buy and Sell Stock II
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 97.35%
- Memory Usage: 3.1 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.4 MB, less than 100.00%
-
- Easy
- Solved
- Runtime: 8 ms, faster than 92.78%
- Memory Usage: 4.7 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.1 MB, less than 100.00%
-
- Hard
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.6 MB, less than 100.00%
-
167. Two Sum II - Input array is sorted
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 95.05%
- Memory Usage: 3 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
181. Employees Earning More Than Their Managers
- Easy
- Completely Solved
- Runtime: 316 ms, faster than 94.84%
- Memory Usage: 0B, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
201. Bitwise AND of Numbers Range
- Easy
- Completely Solved
- Runtime: 8 ms, faster than 96.30%
- Memory Usage: 6.1 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 8 ms, faster than 98.08%
- Memory Usage: 5.9 MB, less than 100.00%
-
222. Count Complete Tree Nodes
- Medium
- Completely Solved
- Runtime: 12 ms, faster than 99.55%
- Memory Usage: 6.5 MB, less than 86.90%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.2 MB, less than 100.00%
-
236. Lowest Common Ancestor of a Binary Tree
- Easy
- Completely Solved
- Runtime: 8 ms, faster than 99.49%
- Memory Usage: 7.3 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.3 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 16 ms, faster than 91.67%
- Memory Usage: 6.3 MB, less than 80.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 93.20%
- Memory Usage: 3.8 MB, less than 100.00%
-
287. Find the Duplicate Number
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 98.80%
- Memory Usage: 3.8 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
303. Range Sum Query - Immutable
- Easy
- Completely Solved
- Runtime: 28 ms, faster than 97.30%
- Memory Usage: 8.3 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 90.59%
- Memory Usage: 3.3 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 96.18%
- Memory Usage: 4.4 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 96.25%
- Memory Usage: 4.3 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00% (4 ms, faster than 100.00%)
- Memory Usage: 2 MB, less than 95.24% (6.4 MB, less than 100.00%)
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3.4 MB, less than 50.00%
- Retry to find a better solution
-
438. Find All Anagrams in a String
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 5.1 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 5 MB, less than 100.00%
-
451. Sort Characters By Frequency
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 5 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 15.38%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
- Medium
- Roughly Solved:
O(N^2)
- Runtime: 672 ms, faster than 5.10%
- Memory Usage: 7 MB, less than 100.00%
- retry
-
- Medium
- Completely Solved (Performance is depending on random inputs)
- Runtime: 44 ms, faster than 97.83%
- Memory Usage: 7.8 MB, less than 43.48%
-
540. Single Element in a Sorted Array
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 100.00%
- Memory Usage: 4.1 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.7 MB, less than 100.00%
-
581. Shortest Unsorted Continuous Subarray
- Easy
- Completely Solved
- Runtime: 24 ms, faster than 96.91%
- Memory Usage: 6.2 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 180 ms, faster than 100.00%
- Memory Usage: 8.4 MB, less than 100.00%
- retry using binary search
-
- Easy
- Completely Solved (Original)
- Runtime: 68 ms, faster than 100.00%
- Memory Usage: 6.9 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 100.00%
- Memory Usage: 5 MB, less than 100.00%
-
700. Search in a Binary Search Tree
- Easy
- Completely Solved
- Runtime: 24 ms, faster than 94.68%
- Memory Usage: 6.6 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 32 ms, faster than 96.84%
- Memory Usage: 6.5 MB, less than 50.00% (This must be the best score)
-
- Easy
- Completely Solved
- Runtime: 80 ms, faster than 97.26%
- Memory Usage: 8.4 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.9 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
787. Cheapest Flights Within K Stops
- Medium
- Completely Solved
- Runtime: 4 ms, faster than 100.00%
- Memory Usage: 4.4 MB, less than 71.43%
-
- Medium
- Completely Solved (Go)
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
- Completely Solved (Python3)
- Runtime: 24 ms, faster than 98.70%
- Memory Usage: 12.7 MB, less than 100.00%
-
792. Number of Matching Subsequences
- Medium
- Completely Solved
- Runtime: 32 ms, faster than 100.00%
- Memory Usage: 6.5 MB, less than 96.30%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 4 ms, faster than 94.34%
- Memory Usage: 3.7 MB, less than 100.00%
-
845. Longest Mountain in Array
- Medium
- Completely Solved
- Runtime: 12 ms, faster than 100.00%
- Memory Usage: 5.9 MB, less than 100.00%
- find out an another solution
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.5 MB, less than 100.00%
-
876. Middle of the Linked List
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 212 ms, faster than 28.57%
- Memory Usage: 8.2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 5.9 MB, less than 80.00%
-
- Easy
- Completely Solved
- Runtime: 120 ms, faster than 100.00%
- Memory Usage: 9.8 MB, less than 100.00% (Min score: 8.1 MB)
-
- Easy
- Completely Solved
- Runtime: 24 ms, faster than 89.92%
- Memory Usage: 6.3 MB, less than 100.00%
-
977. Squares of a Sorted Array
- Easy
- Completely Solved
- Runtime: 24 ms, faster than 100.00%
- Memory Usage: 6.5 MB, less than 100.00%
-
986. Interval List Intersections
- Medium
- Completely Solved
- Runtime: 16 ms, faster than 97.97%
- Memory Usage: 6.3 MB, less than 100.00%
-
999. Available Captures for Rook
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
1005. Maximize Sum Of Array After K Negations
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.9 MB, less than 100.00%
-
1008. Construct Binary Search Tree from Preorder Traversal
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 3.2 MB, less than 100.00%
-
1009. Complement of Base 10 Integer
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 1.9 MB, less than 100.00%
-
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.3 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.2 MB, less than 100.00%
-
1071. Greatest Common Divisor of Strings
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.3 MB, less than 100.00%
-
1105. Filling Bookcase Shelves
- Medium
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 4.3 MB, less than 100.00%
- retry
-
1184. Distance Between Bus Stops
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.8 MB, less than 100.00%
-
- Easy
- Weekly Contest 157 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.1 MB, less than 100.00%
-
- Medium
- Weekly Contest 157 03
- Roughly Solved
- Runtime: 140 ms, faster than 11.94%
- Memory Usage: 2.6 MB, less than 100.00%
-
1221. Split a String in Balanced Strings
- Easy
- Weekly Contest 158 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
1222. Queens That Can Attack the King
- Medium
- Weekly Contest 158 02
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.5 MB, less than 100.00%
-
1232. Check If It Is a Straight Line
- Easy
- Weekly Contest 159 01
- Completely Solved
- Runtime: 4 ms, faster than 94.37%
- Memory Usage: 3.7 MB, less than 100.00%
-
1233. Remove Sub-Folders from the Filesystem
- Medium
- Weekly Contest 159 02
- Completely Solved
- Runtime: X ms, faster than 100.00%
- Memory Usage: X MB, less than 100.00%
-
1234. Replace the Substring for Balanced String
- Medium
- Weekly Contest 159 03
- Completely Solved
- Runtime: X ms, faster than 100.00%
- Memory Usage: X MB, less than 100.00%
-
1252. Cells with Odd Values in a Matrix
- Easy
- Weekly Contest 162 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.5 MB, less than 100.00%
-
1275. Find Winner on a Tic Tac Toe Game
- Easy
- Weekly Contest 165 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2 MB, less than 100.00%
-
1365. How Many Numbers Are Smaller Than the Current Number
- Easy
- Weekly Contest 178 01
- Completely Solved
- Runtime: 4 ms, faster than 100.00%
- Memory Usage: 3.1 MB, less than 100.00%
-
1374. Generate a String With Characters That Have Odd Counts
- Easy
- Weekly Contest 179 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.1 MB, less than 100.00%
-
- Medium
- Weekly Contest 179 02
- Completely Solved
- Runtime: 56 ms, faster than 100.00%
- Memory Usage: 7.1 MB, less than 100.00%
-
1376. Time Needed to Inform All Employees
- Medium
- Weekly Contest 179 03
- Completely Solved
- Runtime: 156 ms, faster than 100.00%
- Memory Usage: 10.6 MB, less than 100.00%
-
1380. Lucky Numbers in a Matrix
- Easy
- Weekly Contest 180 01
- Completely Solved
- Runtime: 16 ms, faster than 100.00%
- Memory Usage: 6 MB, less than 100.00%
-
1389. Create Target Array in the Given Order
- Easy
- Weekly Contest 181 01
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.1 MB, less than 100.00%
-
1408. String Matching in an Array
- Easy
- Completely Solved
- Runtime: 0 ms, faster than 100.00%
- Memory Usage: 2.3 MB, less than 100.00%
- Binary Search and Cumulative Sum solution in Go
- Only 3 lines of code in Go 😎, Time: 4 ms - O(logN), Space: 4.1 MB - O(1)
- The coolest solution using bit manipulation in Go
- The clearest solution in Go, Runtime: 0 ms Memory Usage: 2.1 MB
- The lucky number appears in a Matrix at most once, Time: O(N*M) Space: O(N)
- Two ways of DFS solutions (from bottom to top, from top to bottom) in Go
- Time: O(l+n+m) Space: O(n+m), the clearest solution in Go
- O(N), O(NlogN), O(n^2) 3 + α different solutions in Go
- Dynamically modified multi-layer arrays solution in Go
- Clear solution using a 3x3 int array and char code in Go
- Just 1 line solution 💪🔥 (with another expected regular solution😂) in Go
- 4 + 1 (20 ms, 6.3MB) different solutions in Go
- 4 different solutions in Go
- Clear divide and conquer approach in Go
- BuildTreeNode
- Build TreeNode from LeetCode's TreeNode string