This repository contains my personal solutions for LeetCode problems, implemented in Go. Visit my LeetCode Profile.
| Category | Solved |
|---|---|
| Easy | 82 |
| Medium | 129 |
| Hard | 9 |
| Total | 220 |
| Problem | LeetCode | Solution |
|---|---|---|
| 9. Palindrome Number | Problem | Solution |
| 14. Longest Common Prefix | Problem | Solution |
| 20. Valid Parentheses | Problem | Solution |
| 28. Find the Index of the First Occurrence in a String | Problem | Solution |
| 35. Search Insert Position | Problem | Solution |
| 58. Length of Last Word | Problem | Solution |
| 66. Plus One | Problem | Solution |
| 69. Sqrt(x) | Problem | Solution |
| 70. Climbing Stairs | Problem | Solution |
| 83. Remove Duplicates from Sorted List | Problem | Solution |
| 88. Merge Sorted Array | Problem | Solution |
| 100. Same Tree | Problem | Solution |
| 101. Symmetric Tree | Problem | Solution |
| 104. Maximum Depth of Binary Tree | Problem | Solution |
| 110. Balanced Binary Tree | Problem | Solution |
| 112. Path Sum | Problem | Solution |
| 118. Pascal's Triangle | Problem | Solution |
| 121. Best Time to Buy and Sell Stock | Problem | Solution |
| 125. Valid Palindrome | Problem | Solution |
| 136. Single Number | Problem | Solution |
| 141. Linked List Cycle | Problem | Solution |
| 145. Binary Tree Postorder Traversal | Problem | Solution |
| 169. Majority Element | Problem | Solution |
| 190. Reverse Bits | Problem | Solution |
| 191. Number of 1 Bits | Problem | Solution |
| 202. Happy Number | Problem | Solution |
| 206. Reverse Linked List | Problem | Solution |
| 217. Contains Duplicate | Problem | Solution |
| 219. Contains Duplicate II | Problem | Solution |
| 226. Invert Binary Tree | Problem | Solution |
| 231. Power of Two | Problem | Solution |
| 234. Palindrome Linked List | Problem | Solution |
| 242. Valid Anagram | Problem | Solution |
| 268. Missing Number | Problem | Solution |
| 278. First Bad Version | Problem | Solution |
| 283. Move Zeroes | Problem | Solution |
| 290. Word Pattern | Problem | Solution |
| 303. Range Sum Query - Immutable | Problem | Solution |
| 344. Reverse String | Problem | Solution |
| 349. Intersection of Two Arrays | Problem | Solution |
| 374. Guess Number Higher or Lower | Problem | Solution |
| 383. Ransom Note | Problem | Solution |
| 387. First Unique Character in a String | Problem | Solution |
| 389. Find the Difference | Problem | Solution |
| 392. Is Subsequence | Problem | Solution |
| 409. Longest Palindrome | Problem | Solution |
| 441. Arranging Coins | Problem | Solution |
| 476. Number Complement | Problem | Solution |
| 496. Next Greater Element I | Problem | Solution |
| 500. Keyboard Row | Problem | Solution |
| 506. Relative Ranks | Problem | Solution |
| 530. Minimum Absolute Difference in BST | Problem | Solution |
| 543. Diameter of Binary Tree | Problem | Solution |
| 572. Subtree of Another Tree | Problem | Solution |
| 637. Average of Levels in Binary Tree | Problem | Solution |
| 643. Maximum Average Subarray I | Problem | Solution |
| 700. Search in a Binary Search Tree | Problem | Solution |
| 703. Kth Largest Element in a Stream | Problem | Solution |
| 704. Binary Search | Problem | Solution |
| 705. Design HashSet | Problem | Solution |
| 724. Find Pivot Index | Problem | Solution |
| 844. Backspace String Compare | Problem | Solution |
| 872. Leaf-Similar Trees | Problem | Solution |
| 911. Online Election | Problem | Solution |
| 929. Unique Email Addresses | Problem | Solution |
| 933. Number of Recent Calls | Problem | Solution |
| 977. Squares of a Sorted Array | Problem | Solution |
| 1046. Last Stone Weight | Problem | Solution |
| 1047. Remove All Adjacent Duplicates In String | Problem | Solution |
| 1071. Greatest Common Divisor of Strings | Problem | Solution |
| 1207. Unique Number of Occurrences | Problem | Solution |
| 1237. Find Positive Integer Solution for a Given Equation | Problem | Solution |
| 1732. Find the Highest Altitude | Problem | Solution |
| 1748. Sum of Unique Elements | Problem | Solution |
| 1768. Merge Strings Alternately | Problem | Solution |
| 2215. Find the Difference of Two Arrays | Problem | Solution |
| 2389. Longest Subsequence With Limited Sum | Problem | Solution |
| 2529. Maximum Count of Positive Integer and Negative Integer | Problem | Solution |
| 2540. Minimum Common Value | Problem | Solution |
| 2824. Count Pairs Whose Sum is Less than Target | Problem | Solution |
| 2974. Minimum Number Game | Problem | Solution |
| 3264. Final Array State After K Multiplication Operations I | Problem | Solution |
| Problem | LeetCode | Solution |
|---|---|---|
| 2. Add Two Numbers | Problem | Solution |
| 3. Longest Substring Without Repeating Characters | Problem | Solution |
| 7. Reverse Integer | Problem | Solution |
| 8. String to Integer (atoi) | Problem | Solution |
| 11. Container With Most Water | Problem | Solution |
| 15. 3Sum | Problem | Solution |
| 16. 3Sum Closest | Problem | Solution |
| 18. 4Sum | Problem | Solution |
| 19. Remove Nth Node From End of List | Problem | Solution |
| 22. Generate Parentheses | Problem | Solution |
| 33. Search in Rotated Sorted Array | Problem | Solution |
| 34. Find First and Last Position of Element in Sorted Array | Problem | Solution |
| 36. Valid Sudoku | Problem | Solution |
| 39. Combination Sum | Problem | Solution |
| 40. Combination Sum II | Problem | Solution |
| 46. Permutations | Problem | Solution |
| 47. Permutations II | Problem | Solution |
| 48. Rotate Image | Problem | Solution |
| 49. Group Anagrams | Problem | Solution |
| 50. Pow(x, n) | Problem | Solution |
| 56. Merge Intervals | Problem | Solution |
| 57. Insert Interval | Problem | Solution |
| 62. Unique Paths | Problem | Solution |
| 74. Search a 2D Matrix | Problem | Solution |
| 75. Sort Colors | Problem | Solution |
| 77. Combinations | Problem | Solution |
| 78. Subsets | Problem | Solution |
| 79. Word Search | Problem | Solution |
| 80. Remove Duplicates from Sorted Array II | Problem | Solution |
| 90. Subsets II | Problem | Solution |
| 91. Decode Ways | Problem | Solution |
| 92. Reverse Linked List II | Problem | Solution |
| 98. Validate Binary Search Tree | Problem | Solution |
| 102. Binary Tree Level Order Traversal | Problem | Solution |
| 103. Binary Tree Zigzag Level Order Traversal | Problem | Solution |
| 128. Longest Consecutive Sequence | Problem | Solution |
| 137. Single Number II | Problem | Solution |
| 142. Linked List Cycle II | Problem | Solution |
| 143. Reorder List | Problem | Solution |
| 146. LRU Cache | Problem | Solution |
| 150. Evaluate Reverse Polish Notation | Problem | Solution |
| 151. Reverse Words in a String | Problem | Solution |
| 152. Maximum Product Subarray | Problem | Solution |
| 153. Find Minimum in Rotated Sorted Array | Problem | Solution |
| 155. Min Stack | Problem | Solution |
| 162. Find Peak Element | Problem | Solution |
| 165. Compare Version Numbers | Problem | Solution |
| 167. Two Sum II - Input Array Is Sorted | Problem | Solution |
| 189. Rotate Array | Problem | Solution |
| 198. House Robber | Problem | Solution |
| 199. Binary Tree Right Side View | Problem | Solution |
| 201. Bitwise AND of Numbers Range | Problem | Solution |
| 208. Implement Trie (Prefix Tree) | Problem | Solution |
| 209. Minimum Size Subarray Sum | Problem | Solution |
| 211. Design Add and Search Words Data Structure | Problem | Solution |
| 215. Kth Largest Element in an Array | Problem | Solution |
| 227. Basic Calculator II | Problem | Solution |
| 230. Kth Smallest Element in a BST | Problem | Solution |
| 235. Lowest Common Ancestor of a Binary Search Tree | Problem | Solution |
| 238. Product of Array Except Self | Problem | Solution |
| 275. H-Index II | Problem | Solution |
| 287. Find the Duplicate Number | Problem | Solution |
| 300. Longest Increasing Subsequence | Problem | Solution |
| 328. Odd Even Linked List | Problem | Solution |
| 347. Top K Frequent Elements | Problem | Solution |
| 355. Design Twitter | Problem | Solution |
| 367. Valid Perfect Square | Problem | Solution |
| 380. Insert Delete GetRandom O(1) | Problem | Solution |
| 397. Integer Replacement | Problem | Solution |
| 398. Random Pick Index | Problem | Solution |
| 402. Remove K Digits | Problem | Solution |
| 414. Third Maximum Number | Problem | Solution |
| 424. Longest Repeating Character Replacement | Problem | Solution |
| 435. Non-overlapping Intervals | Problem | Solution |
| 442. Find All Duplicates in an Array | Problem | Solution |
| 450. Delete Node in a BST | Problem | Solution |
| 451. Sort Characters By Frequency | Problem | Solution |
| 473. Matchsticks to Square | Problem | Solution |
| 475. Heaters | Problem | Solution |
| 503. Next Greater Element II | Problem | Solution |
| 523. Continuous Subarray Sum | Problem | Solution |
| 528. Random Pick with Weight | Problem | Solution |
| 560. Subarray Sum Equals K | Problem | Solution |
| 567. Permutation in String | Problem | Solution |
| 611. Valid Triangle Number | Problem | Solution |
| 621. Task Scheduler | Problem | Solution |
| 622. Design Circular Queue | Problem | Solution |
| 633. Sum of Square Numbers | Problem | Solution |
| 658. Find K Closest Elements | Problem | Solution |
| 665. Non-decreasing Array | Problem | Solution |
| 692. Top K Frequent Words | Problem | Solution |
| 707. Design Linked List | Problem | Solution |
| 713. Subarray Product Less Than K | Problem | Solution |
| 739. Daily Temperatures | Problem | Solution |
| 791. Custom Sort String | Problem | Solution |
| 853. Car Fleet | Problem | Solution |
| 875. Koko Eating Bananas | Problem | Solution |
| 876. Middle of the Linked List | Problem | Solution |
| 901. Online Stock Span | Problem | Solution |
| 904. Fruit Into Baskets | Problem | Solution |
| 912. Sort an Array | Problem | Solution |
| 923. 3Sum With Multiplicity | Problem | Solution |
| 930. Binary Subarrays With Sum | Problem | Solution |
| 950. Reveal Cards In Increasing Order | Problem | Solution |
| 973. K Closest Points to Origin | Problem | Solution |
| 981. Time Based Key-Value Store | Problem | Solution |
| 1004. Max Consecutive Ones III | Problem | Solution |
| 1011. Capacity To Ship Packages Within D Days | Problem | Solution |
| 1338. Reduce Array Size to The Half | Problem | Solution |
| 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold | Problem | Solution |
| 1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit | Problem | Solution |
| 1448. Count Good Nodes in Binary Tree | Problem | Solution |
| 1472. Design Browser History | Problem | Solution |
| 1493. Longest Subarray of 1's After Deleting One Element | Problem | Solution |
| 1574. Shortest Subarray to be Removed to Make Array Sorted | Problem | Solution |
| 1642. Furthest Building You Can Reach | Problem | Solution |
| 1657. Determine if Two Strings Are Close | Problem | Solution |
| 1695. Maximum Erasure Value | Problem | Solution |
| 1856. Maximum Subarray Min-Product | Problem | Solution |
| 2095. Delete the Middle Node of a Linked List | Problem | Solution |
| 2300. Successful Pairs of Spells and Potions | Problem | Solution |
| 2336. Smallest Number in Infinite Set | Problem | Solution |
| 2405. Optimal Partition of String | Problem | Solution |
| 2410. Maximum Matching of Players With Trainers | Problem | Solution |
| 2424. Longest Uploaded Prefix | Problem | Solution |
| 2461. Maximum Sum of Distinct Subarrays With Length K | Problem | Solution |
| 2462. Total Cost to Hire K Workers | Problem | Solution |
| 2542. Maximum Subsequence Score | Problem | Solution |
| 3092. Most Frequent IDs | Problem | Solution |
| Problem | LeetCode | Solution |
|---|---|---|
| 23. Merge k Sorted Lists | Problem | Solution |
| 42. Trapping Rain Water | Problem | Solution |
| 76. Minimum Window Substring | Problem | Solution |
| 84. Largest Rectangle in Histogram | Problem | Solution |
| 239. Sliding Window Maximum | Problem | Solution |
| 295. Find Median from Data Stream | Problem | Solution |
| 354. Russian Doll Envelopes | Problem | Solution |
| 460. LFU Cache | Problem | Solution |
| 1793. Maximum Score of a Good Subarray | Problem | Solution |