Notion Database - all of my notes on the problems
I prefer to initially code using Google Docs as my primary platform, unless it's a new topic that necessitates debugging in a terminal or if I encounter challenges that prevent me from completing the task within the allotted time. (30m)
- 1. Two Sum
- 2. Add Two Numbers
- 3. Longest Substring Without Repeating Characters
- 4. Median of Two Sorted Arrays
- 5. Longest Palindromic Substring
- 7. Generate Parentheses
- 9. Palindrome Number
- 11. Container With Most Water
- 15. 3Sum
- 19. Remove Nth Node From End of List
- 20. Valid Parentheses
- 21. Merge Two Sorted Lists
- 22. Generate Parentheses
- 23. Merge k Sorted Lists
- 33. Search in Rotated Sorted Array
- 48. Rotate Image
- 49. Group Anagrams
- 53. Maximum Subarray
- 54. Spiral Matrix
- 56. Merge Intervals
- 57. Insert Interval
- 73. Set Matrix Zeroes
- 76. Minimum Window Substring
- 83. Remove Duplicates from Sorted List
- 121. Best Time to Buy and Sell Stock
- 128. Longest Consecutive Sequence
- 133. Clone Graph
- 135. Candy
- 125. Valid Palindrome
- 141. Linked List Cycle
- 143. Reorder List
- 152. Maximum Product Subarray
- 153. Find Minimum in Rotated Sorted Array
- 190. Reverse Bits
- 191. Number of 1 Bits
- 198. House Robber
- 200. Number of Islands
- 206. Reverse Linked List
- 207. Course Schedule
- 213. House Robber II
- 217. Contains Duplicate
- 238. Product of Array Except Self
- 242. Valid Anagram
- 268. Missing Number
- 271. Encode and Decode Strings (Premium)
- 295. Find Median from Data Stream
- 371. Sum of Two Integers
- 374. Top K Frequent Elements
- 338. Counting Bits
- 394. Decode String
- 417. Pacific Atlantic Water Flow
- 424. Longest Repeating Character Replacement
- 435. Non-overlapping Intervals
- 530. Minimum Absolute Difference in BST
- 647. Palindromic Substrings
- 771. Jewels and Stones
- 997. Find the Town Judge
- 1161. Maximum Level Sum of a Binary Tree
- 1187. Make Array Strictly Increasing
- 1365. How Many Numbers Are Smaller Than the Current Number
- 1512. Number of Good Pairs
- 1569. Number of Ways to Reorder Array to Get Same BST
- 1791. Find Center of Star Graph
- 1909. Remove One Element to Make the Array Strictly Increasing
- 1971. Find if Path Exists in Graph
solution.js - The solution I submitted
my_solution.js - My attemp with logs and comments
o_solution.js - Online/others' solutions
To run the Elixir solution:
iex ./.../solution.ex
Batch create:
chapter=997 && mkdir ./$chapter && touch ./$chapter/my_solution.ex && touch ./$chapter/solution.ex && alias x="iex ./$chapter/my_solution.ex"
then you can use
x
for quick debug.
To run the JS solution:
node ./.../solution.js
Batch create:
chapter=48 && mkdir ./$chapter && touch ./$chapter/my_solution.js && touch ./$chapter/solution.js && alias x="node ./$chapter/my_solution.js"
then you can use
x
for quick debug.
Author: Jing Hui PANG - LinkedIn | Email | GitHub | LeetCode | WakaTime