Hi, welcome to my leetcode "diary". I am currently trying to learn algorithm and solve algorithm problems. So this is the place where I put my thoughts and solutions to specific problems on leetcode. Feel free to leave a comment as well.
- 👍 Binary Search Tree Traversal
- All sorts of tree problems
- 700. Search in a Binary Search Tree
- 671. Second Minimum Node In a Binary Tree
- 637. Average of Levels in Binary Tree
- 617. Merge Two Binary Trees
- 606. Construct String from Binary Tree
- 590. N-ary Tree Postorder Traversal
- 589. N-ary Tree Preorder Traversal
- 572. Subtree of Another Tree
- 563. Binary Tree Tilt
- 559. Maximum Depth of N-ary Tree
- 543. Diameter of Binary Tree
- 530. Minimum Absolute Difference in BST
- 404. Sum of Left Leaves
- 501. Find Mode in Binary Search Tree
- 235. Lowest Common Ancestor of a Binary Search Tree
- 257. Binary Tree Paths
- 226. Invert Binary Tree
- 111. Minimum Depth of Binary Tree
- 110. Balanced Binary Tree
- 108. Convert Sorted Array to Binary Search Tree
- 104. Maximum Depth of Binary Tree
- 101. Symmetric Tree
- 100. Same Tree
- 653 Two Sum IV - Input is a BST
- 112 Path Sum
- 167 Two Sum II - Input Array Is Sorted
- 783. Minimum Distance Between BST Nodes
- 872. Leaf-Similar Trees
- 897. Increasing Order Search Tree
- 938. Range Sum of BST
- 965. Univalued Binary Tree
- 993. Cousins in Binary Tree
- 1022. Sum of Root To Leaf Binary Numbers
- 703. Kth Largest Element in a Stream
- 310. Minimum Height Trees
- 96. Unique Binary Search Trees
- 95. Unique Binary Search Trees II
- 98. Validate Binary Search Tree
- 99. Recover Binary Search Tree
- 909. Snakes and Ladders
- 198. House Robber
- 1094. Car Pooling
- 413. Arithmetic Slices
- 688. Knight Probability in Chessboard
- 5. Longest Palindromic Substring
- 1817. Finding the Users Active Minutes
- 328. Odd Even Linked List
- 2134. Minimum Swaps to Group All 1's Together II
- 1695. Maximum Erasure Value
- 1910. Remove All Occurrences of a Substring
- 1347. Minimum Number of Steps to Make Two Strings Anagram
- 306. Additive Number
- 1849. Splitting a String Into Descending Consecutive Values
- 525. Contiguous Array
- 209. Minimum Size Subarray Sum
- 1838. Frequency of the Most Frequent Element
- 374. Guess Number Higher or Lower
- 821. Shortest Distance to a Character
- 1624. Largest Substring Between Two Equal Characters
- 300. Longest Increasing Subsequence
- 1560. Most Visited Sector in a Circular Track
- 1221. Split a String in Balanced Strings
- 1502. Can Make Arithmetic Progression From Sequence
- 1071. Greatest Common Divisor of Strings
- 2114. Maximum Number of Words Found in Sentences
- 35. Search Insert Position
- 507. Perfect Number
- 1844. Replace All Digits with Characters
- 21. Merge Two Sorted Lists
- 561. Array Partition I
- 455. Assign Cookies
- 409. Longest Palindrome
- 1 Two sums
- 2. Add Two Numbers
- 3. Longest Substring Without Repeating Characters
- 6. Zigzag Conversion
- 7. Reverse Integer
- 8. String to Integer (atoi)
- 9. Palindrome Number
- 11. Container With Most Water
- 12. Integer to Roman
- 13. Roman to Integer
- 14. Longest Common Prefix
- 15. 3Sum
- 16. 3Sum Closest
- 17. Letter Combinations of a Phone Number
- 18. 4Sum
- 19. Remove Nth Node From End of List
- 20. Valid Parentheses
- 22. Generate Parentheses
- 24. Swap Nodes in Pairs
- 26. Remove Duplicates from Sorted Array
- 27. Remove Element
- 28. Implement strStr()
- 29. Divide Two Integers
- 31. Next Permutation
- 36. Valid Sudoku
- 38. Count and Say
- 33. Search in Rotated Sorted Array
- 39. Combination Sum
- 40. Combination Sum II
- 46. Permutations1
- 47. Permutations II
- 34. Find First and Last Position of Element in Sorted Array
- 43. Multiply Strings
- 45. Jump Game II
- 48. Rotate Image
- 49. Group Anagrams
- 77. Combinations
- 78. Subsets
- 79. Word Search
- 80. Remove Duplicates from Sorted Array II
- 81. Search in Rotated Sorted Array II
- 82. Remove Duplicates from Sorted List II
- 83. Remove Duplicates from Sorted List
- 86. Partition List
- 89. Gray Code
- 90. Subsets II
- 91. Decode Ways
- 92. Reverse Linked List II
- 93. Restore IP Addresses
- 97. Interleaving String
- 102. Binary Tree Level Order Traversal
- 103. Binary Tree Zigzag Level Order Traversal
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 107. Binary Tree Level Order Traversal II
- 109. Convert Sorted List to Binary Search Tree
- 113. Path Sum II
- 114. Flatten Binary Tree to Linked List
- 116. Populating Next Right Pointers in Each Node
- 117. Populating Next Right Pointers in Each Node II
- 120.Triangle
- 128. Longest Consecutive Sequence
- 129. Sum Root to Leaf Numbers
- 130. Surrounded Regions
- 131. Palindrome Partitioning
- 134. Gas Station
- 137. Single Number II
- 139. Word Break
- 142. Linked List Cycle II
- 143. Reorder List
- 150. Evaluate Reverse Polish Notation
- 151. Reverse Words in a String
- 152. Maximum Product Subarray
- 153. Find Minimum in Rotated Sorted Array
- 162. Find Peak Element
- 165. Compare Version Numbers
- 172. Factorial Trailing Zeroes
- 179. Largest Number
- 187. Repeated DNA Sequences
- 189. Rotate Array
- 199. Binary Tree Right Side View
- 200. Number of Islands
- 204. Count Primes
- 207. Course Schedule
- 213. House Robber II
- 215. Kth Largest Element in an Array
- 216. Combination Sum III
- 220. Contains Duplicate III
- 221. Maximal Square
- 222. Count Complete Tree Nodes
- 223. Rectangle Area
- 227. Basic Calculator II
- 229. Majority Element II
- 230. Kth Smallest Element in a BST
- 236. Lowest Common Ancestor of a Binary Tree
- 238. Product of Array Except Self
- 240. Search a 2D Matrix II
- 313. Super Ugly Number
- 316. Remove Duplicate Letters
- 319. Bulb Switcher
- 322. Coin Change
- 324. Wiggle Sort II
- 331. Verify Preorder Serialization of a Binary Tree
- 334. Increasing Triplet Subsequence
- 337. House Robber III
- 343. Integer Break
- 347. Top K Frequent Elements
- 357. Count Numbers with Unique Digits
- 368. Largest Divisible Subset
- 372. Super Pow
- 375. Guess Number Higher or Lower II
- 376. Wiggle Subsequence
- 377. Combination Sum IV
- 378. Kth Smallest Element in a Sorted Matrix
- 386. Lexicographical Numbers
- 388. Longest Absolute File Path
- 390. Elimination Game
- 393. UTF-8 Validation
- 394. Decode String
- 395. Longest Substring with At Least K Repeating Characters
- 396. Rotate Function
- 397. Integer Replacement
- 400. Nth Digit
- 402. Remove K Digits
- 406. Queue Reconstruction by Height
- 416. Partition Equal Subset Sum
- 419. Battleships in a Board
- 423. Reconstruct Original Digits from English
- 424. Longest Repeating Character Replacement
- 433. Minimum Genetic Mutation
- 435. Non-overlapping Intervals
- 436. Find Right Interval
- 437. Path Sum III
- 438. Find All Anagrams in a String
- 442. Find All Duplicates in an Array
- 443. String Compression
- 445. Add Two Numbers II
- 447. Number of Boomerangs
- 450. Delete Node in a BST
- 451. Sort Characters By Frequency
- 452. Minimum Number of Arrows to Burst Balloons