Leetcode Solutions in Go
Please give this repo a ⭐ if it inspires you.
| LC # | Description |
|---|---|
| 1480 | Running Sum of 1d Array |
| 1431 | Kids With the Greatest Number of Candies |
| 1 | Two Sum |
| 575 | Distribute Candies |
| 1365 | How Many Numbers Are Smaller Than the Current Number |
| 1773 | Count Items Matching a Rule |
| 645 | Set Mismatch |
| 268 | Missing Number |
| 160 | Intersection of Two Linked Lists |
| 637 | Average of Levels in Binary Tree |
| 559 | Maximum Depth of N-ary Tree |
| 690 | Employee Importance |
| 993 | Cousins in Binary Tree |
| 1748 | Sum of Unique Elements |
| 232 | Implement Queue using Stacks |
| 1332 | Remove Palindromic Subsequences |
| 1678 | Goal Parser Interpretation |
| 1022 | Sum of Root To Leaf Binary Numbers |
| 404 | Sum of Left Leaves |
| 112 | Path Sum |
| 535 | Encode and Decode TinyURL |
| 1560 | Most Visited Sector in a Circular Track |
| 598 | Range Addition II |
| 762 | Prime Number of Set Bits in Binary Representation |
| 500 | Keyboard Row |
| 1656 | Design an Ordered Stream |
| 234 | Palindrome Linked List |
| 1614 | Maximum Nesting Depth of the Parentheses |
| 1668 | Maximum Repeating Substring |
| 1704 | Determine if String Halves Are Alike |
| 953 | Verifying an Alien Dictionary |
| 509 | Fibonacci Number |
| 589 | N-ary Tree Preorder Traversal |
| 696 | Count Binary Substrings |
| 326 | Power of Three |
| 703 | Kth Largest Element in a Stream |
| 204 | Count Primes |
| 453 | Minimum Moves to Equal Array Elements |
| 709 | To Lower Case |
| 1710 | Maximum Units on a Truck |
| 1047 | Remove All Adjacent Duplicates In String |
| 108 | Convert Sorted Array to Binary Search Tree |
| 415 | Add Strings |
| 653 | Two Sum IV - Input is a BST |
| 1629 | Slowest Key |
| 206 | Reverse Linked List |
| 1189 | Maximum Number of Balloons |
| 350 | Intersection of Two Arrays II |
| 1275 | Find Winner on a Tic Tac Toe Game |
| 485 | Max Consecutive Ones |
| 929 | Unique Email Addresses |
| 922 | Sort Array By Parity II |
| 463 | Island Perimeter |
| 70 | Climbing Stairs |
| 543 | Diameter of Binary Tree |
| 374 | Guess Number Higher or Lower |
| 496 | Next Greater Element I |
| 155 | Min Stack |
| 226 | Invert Binary Tree |
| 441 | Arranging Coins |
| 1413 | Minimum Value to Get Positive Step by Step Sum |
| 203 | Remove Linked List Elements |
| 448 | Find All Numbers Disappeared in an Array |
| 461 | Hamming Distance |
| 53 | Maximum Subarray |
| 35 | Search Insert Position |
| 1217 | Minimum Cost to Move Chips to The Same Position |
| 563 | Binary Tree Tilt |
| 1446 | Consecutive Characters |
| 938 | Range Sum of BST |
| 1200 | Minimum Absolute Difference |
| 231 | Power of Two |
| 476 | Number Complement |
| 876 | Middle of the Linked List |
| 997 | Find the Town Judge |
| 1009 | Complement of Base 10 Integer |
| 67 | Add Binary |
| 290 | Word Pattern |
| 605 | Can Place Flowers |
| 520 | Detect Capital |
| 941 | Valid Mountain Array |
| 389 | Find the Difference |
| 258 | Add Digits |
| 1108 | Defanging an IP Address |
| 1832 | Check if the Sentence Is Pangram |
| 104 | Maximum Depth of Binary Tree |
| 136 | Single Number |
| 171 | Excel Sheet Column Number |
| 228 | Summary Ranges |
| 338 | Counting Bits |
| 392 | Is Subsequence |
| 21 | Merge Two Sorted Lists |
| 141 | Linked List Cycle |
| 617 | Merge Two Binary Trees |
| 20 | Valid Parentheses |
| 1351 | Count Negative Numbers in a Sorted Matrix |
| 905 | Sort Array By Parity |
| 344 | Reverse String |
| 1460 | Make Two Arrays Equal by Reversing Sub-arrays |
| 977 | Squares of a Sorted Array |
| 349 | Intersection of Two Arrays |
| 1002 | Find Common Characters |
| 766 | Toeplitz Matrix |
| 704 | Binary Search |
| 1160 | Find Words That Can Be Formed by Characters |
| 412 | Fizz Buzz |
| 266 | Palindrome Permutation |
| 145 | Binary Tree Postorder Traversal |
| 169 | Majority Element |
| 242 | Valid Anagram |
| 217 | Contains Duplicate |
| 283 | Move Zeroes |
| 1260 | Shift 2D Grid |
| 700 | Search in a Binary Search Tree |
| 844 | Backspace String Compare |
| 88 | Merge Sorted Array |
| 859 | Buddy Strings |
| 557 | Reverse Words in a String III |
| 976 | Largest Perimeter Triangle |
| 219 | Contains Duplicate II |
| 1544 | Make The String Great |
| 1323 | Maximum 69 Number |
| 2325 | Decode the Message |
| 121 | Best Time to Buy and Sell Stock |
| 1971 | Find if Path Exists in Graph |
| 2389 | Longest Subsequence With Limited Sum |
| 2073 | Time Needed to Buy Tickets |
| 697 | Degree of an Array |
| LC # | Description |
|---|---|
| 931 | Minimum Falling Path Sum |
| 946 | Validate Stack Sequences |
| 29 | Divide Two Integers |
| 820 | Short Encoding of Words |
| 1381 | Design a Stack With Increment Operation |
| 623 | Add One Row to Tree |
| 12 | Integer to Roman |
| 1315 | Sum of Nodes with Even-Valued Grandparent |
| 1302 | Deepest Leaves Sum |
| 322 | Coin Change |
| 1305 | All Elements in Two Binary Search Trees |
| 1461 | Check If a String Contains All Binary Codes of Size K |
| 1721 | Swapping Nodes in a Linked List |
| 714 | Best Time to Buy and Sell Stock with Transaction Fee |
| 478 | Generate Random Point in a Circle |
| 208 | Implement Trie (Prefix Tree) |
| 376 | Wiggle Subsequence |
| 38 | Count and Say |
| 146 | LRU Cache |
| 1583 | Count Unhappy Friends |
| 729 | My Calendar I |
| 841 | Keys And Rooms |
| 113 | Path Sum II |
| 1398 | Design Underground System |
| 1797 | Design Authentication Manager |
| 1798 | Maximum Number of Consecutive Values You Can Make |
| 966 | Vowel Spellchecker |
| 1689 | Partitioning Into Minimum Number Of Deci-Binary Numbers |
| 1764 | Form Array by Concatenating Subarrays of Another Array |
| 923 | 3Sum With Multiplicity |
| 417 | Pacific Atlantic Water Flow |
| 916 | Word Subsets |
| 5 | Longest Palindromic Substring |
| 647 | Palindromic Substrings |
| 971 | Flip Binary Tree To Match Preorder Traversal |
| 1726 | Tuple with Same Product |
| 474 | Ones and Zeroes |
| 1488 | Avoid Flood in The City |
| 947 | Most Stones Removed with Same Row or Column |
| 622 | Design Circular Queue |
| 1670 | Design Front Middle Back Queue |
| 494 | Target Sum |
| 17 | Letter Combinations of a Phone Number |
| 638 | Shopping Offers |
| 667 | Beautiful Arrangement II |
| 650 | 2 Keys Keyboard |
| 801 | Minimum Swaps To Make Sequences Increasing |
| 341 | Flatten Nested List Iterator |
| 86 | Partition List |
| 91 | Decode Ways |
| 62 | Unique Paths |
| 1209 | Remove All Adjacent Duplicates in String II |
| 279 | Perfect Squares |
| 377 | Combination Sum IV |
| 120 | Triangle |
| 554 | Brick Wall |
| 48 | Rotate Image |
| 935 | Knight Dialer |
| 740 | Delete and Earn |
| 63 | Unique Paths II |
| 34 | Find First and Last Position of Element in Sorted Array |
| 970 | Powerful Integers |
| 665 | Non-decreasing Array |
| 1472 | Design Browser History |
| 109 | Convert Sorted List to Binary Search Tree |
| 583 | Delete Operation for Two Strings |
| 1423 | Maximum Points You Can Obtain from Cards |
| 304 | Range Sum Query 2D - Immutable |
| 816 | Ambiguous Coordinates |
| 114 | Flatten Binary Tree to Linked List |
| 1048 | Longest String Chain |
| 213 | House Robber II |
| 462 | Minimum Moves to Equal Array Elements II |
| 890 | Find and Replace Pattern |
| 337 | House Robber III |
| 921 | Minimum Add to Make Parentheses Valid |
| 1871 | Jump Game VII |
| 150 | Evaluate Reverse Polish Notation |
| 318 | Maximum Product of Word Lengths |
| 1695 | Maximum Erasure Value |
| 1268 | Search Suggestions System |
| 695 | Max Area of Island |
| 97 | Interleaving String |
| 1465 | Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts |
| 128 | Longest Consecutive Sequence |
| 105 | Construct Binary Tree from Preorder and Inorder Traversal |
| 1696 | Jump Game VI |
| 698 | Partition to K Equal Sum Subsets |
| 22 | Generate Parentheses |
| 795 | Number of Subarrays with Bounded Maximum |
| 118 | Pascal's Triangle |
| 576 | Out of Boundary Paths |
| 684 | Redundant Connection |
| 1004 | Max Consecutive Ones III |
| 236 | Lowest Common Ancestor of a Binary Tree |
| 89 | Gray Code |
| 378 | Kth Smallest Element in a Sorted Matrix |
| 718 | Maximum Length of Repeated Subarray |
| 300 | Longest Increasing Subsequence |
| 162 | Find Peak Element |
| 791 | Custom Sort String |
| 611 | Valid Triangle Number |
| 235 | Lowest Common Ancestor of a Binary Search Tree |
| 838 | Push Dominoes |
| 915 | Partition Array into Disjoint Intervals |
| 814 | Binary Tree Pruning |
| 90 | Subsets II |
| 877 | Stone Game |
| 429 | N-ary Tree Level Order Traversal |
| 926 | Flip String to Monotone Increasing |
| 954 | Array of Doubled Pairs |
| 49 | Group Anagrams |
| 73 | Set Matrix Zeroes |
| 1448 | Count Good Nodes in Binary Tree |
| 36 | Valid Sudoku |
| 153 | Find Minimum in Rotated Sorted Array |
| 565 | Array Nesting |
| 848 | Shifting Letters |
| 978 | Longest Turbulent Subarray |
| 54 | Spiral Matrix |
| 1239 | Maximum Length of a Concatenated String with Unique Characters |
| 725 | Split Linked List in Parts |
| 473 | Matchsticks to Square |
| 1143 | Longest Common Subsequence |
| 55 | Jump Game |
| 442 | Find All Duplicates in an Array |
| 79 | Word Search |
| 201 | Bitwise AND of Numbers Range |
| 1008 | Construct Binary Search Tree from Preorder Traversal |
| 309 | Best Time to Buy and Sell Stock with Cooldown |
| 437 | Path Sum III |
| 4511 | Sort Characters By Frequency |
| 222 | Count Complete Tree Nodes |
| 75 | Sort Colors |
| 15 | 3Sum |
| 994 | Rotting Oranges |
| 430 | Flatten a Multilevel Doubly Linked List |
| 130 | Surrounded Regions |
| 129 | Sum Root to Leaf Numbers |
| 260 | Single Number III |
| 43 | Multiply Strings |
| 96 | Unique Binary Search Trees |
| 122 | Best Time to Buy and Sell Stock II |
| 739 | Daily Temperatures |
| 368 | Largest Divisible Subset |
| 540 | Single Element in a Sorted Array |
| 106 | Construct Binary Tree from Inorder and Postorder Traversal |
| 450 | Delete Node in a BST |
| 986 | Interval List Intersections |
| 238 | Product of Array Except Self |
| 797 | All Paths From Source to Target |
| 721 | Accounts Merge |
| 198 | House Robber |
| 328 | Odd Even Linked List |
| 152 | Maximum Product Subarray |
| 1306 | Jump Game III |
| 790 | Domino and Tromino Tiling |
| 416 | Partition Equal Subset Sum |
| 310 | Minimum Height Trees |
| 221 | Maximal Square |
| 394 | Decode String |
| 143 | Reorder List |
| 210 | Course Schedule II |
| 56 | Merge Intervals |
| 227 | Basic Calculator II |
| 973 | K Closest Points to Origin |
| 116 | Populating Next Right Pointers in Each Node |
| 1015 | Smallest Integer Divisible by K |
| 1026 | Maximum Difference Between Node and Ancestor |
| 1010 | Pairs of Songs With Total Durations Divisible by 60 |
| 131 | Palindrome Partitioning |
| 382 | Linked List Random Node |
| 1041 | Robot Bounded In Circle |
| 701 | Insert into a Binary Search Tree |
| 452 | Minimum Number of Arrows to Burst Balloons |
| 8 | String to Integer (atoi) |
| 849 | Maximize Distance to Closest Person |
| 142 | Linked List Cycle II |
| 875 | Koko Eating Bananas |
| 134 | Gas Station |
| 1291 | Sequential Digits |
| 421 | Maximum XOR of Two Numbers in an Array |
| 211 | Design Add and Search Words Data Structure |
| 438 | Find All Anagrams in a String |
| 454 | 4Sum II |
| 525 | Contiguous Array |
| 80 | Remove Duplicates from Sorted Array II |
| 532 | K-diff Pairs in an Array |
| 560 | Subarray Sum Equals K |
| 567 | Permutation in String |
| 78 | Subsets |
| 39 | Combination Sum |
| 402 | Remove K Digits |
| 133 | Clone Graph |
| 148 | Sort List |
| 662 | Maximum Width of Binary Tree |
| 413 | Arithmetic Slices |
| 799 | Champagne Tower |
| 82 | Remove Duplicates from Sorted List II |
| 61 | Rotate List |
| 138 | Copy List with Random Pointer |
| 71 | Simplify Path |
| 1249 | Minimum Remove to Make Valid Parentheses |
| 856 | Score of Parentheses |
| 316 | Remove Duplicate Letters |
| 763 | Partition Labels |
| 1663 | Smallest String With A Given Numeric Value |
| 991 | Broken Calculator |
| 881 | Boats to Save People |
| 1024 | Two City Scheduling |
| 81 | Search in Rotated Sorted Array II |
| 287 | Find the Duplicate Number |
| 74 | Search a 2D Matrix |
| 11 | Container With Most Water |
| 538 | Convert BST to Greater Tree |
| 230 | Kth Smallest Element in a BST |
| 284 | Peeking Iterator |
| 216 | Combination Sum III |
| 47 | Permutations II |
| 117 | Populating Next Right Pointers in Each Node II |
| 743 | Network Delay Time |
| 474 | Ones and Zeroes |
| 167 | Two Sum II - Input Array Is Sorted |
| 3 | Longest Substring Without Repeating Characters |
| 1658 | Minimum Operations to Reduce X to Zero |
| 215 | Kth Largest Element in an Array |
| 1570 | Dot Product of Two Sparse Vectors |
| 199 | Binary Tree Right Side View |
| 92 | Reverse Linked List II |
| 307 | Range Sum Query - Mutable |
| 240 | Search a 2D Matrix II |
| 1457 | Pseudo-Palindromic Paths in a Binary Tree |
| 1770 | Maximum Score from Performing Multiplication Operations |
| 985 | Sum of Even Numbers After Queries |
| 1680 | Concatenation of Consecutive Binary Numbers |
| 990 | Satisfiability of Equality Equations |
| 658 | Find K Closest Elements |
| 1578 | Minimum Time to Make Rope Colorful |
| 16 | 3Sum Closest |
| 334 | Increasing Triplet Subsequence |
| 2095 | Delete the Middle Node of a Linked List |
| 1662 | Check If Two String Arrays are Equivalent |
| 523 | Continuous Subarray Sum |
| 835 | Image Overlap |
| 433 | Minimum Genetic Mutation |
| 1926 | Nearest Exit from Entrance in Maze |
| 2225 | Find Players With Zero or One Losses |
| 380 | Insert Delete GetRandom O(1) |
| 1207 | Unique Number of Occurrences |
| 45 | Jump Game II |
| 1014 | Best Sightseeing Pair |
| 886 | Possible Bipartition |
| 2279 | Maximum Bags With Full Capacity of Rocks |
| 343 | Integer Break |
| 256 | Paint House |
| 487 | Max Consecutive Ones II |
| 1746 | Maximum Subarray Sum After One Operation |
| 1230 | Toss Strange Coins |
| 2498 | Frog Jump II |
| 2244 | Minimum Rounds to Complete All Tasks |
| 1749 | Maximum Absolute Sum of Any Subarray |
| 2186 | Minimum Number of Steps to Make Two Strings Anagram II |
| 2414 | Length of the Longest Alphabetical Continuous Substring |
| 1519 | Number of Nodes in the Sub-Tree With the Same Label |
| LC # | Description |
|---|---|
| 354 | Russian Doll Envelopes |
| 936 | Stamping The Sequence |
| 32 | Longest Valid Parentheses |
| 1559 | Detect Cycles in 2D Grid |
| 329 | Longest Increasing Path in a Matrix |
| 1192 | Critical Connections in a Network |
| 980 | Unique Paths III |
| 745 | Prefix and Suffix Search |
| 630 | Course Schedule III |
| 65 | Valid Number |
| 968 | Binary Tree Cameras |
| 1473 | Paint House III |
| 51 | N-Queens |
| 52 | N-Queens II |
| 778 | Swim in Rising Water |
| 315 | Count of Smaller Numbers After Self |
| 135 | Candy |
| 927 | Three Equal Parts |
| 25 | Reverse Nodes in k-Group |
| 233 | Number of Digit One |
| 42 | Trapping Rain Water |
| 132 | Palindrome Partitioning II |
| 546 | Remove Boxes |
| 37 | Sudoku Solver |
| 850 | Rectangle Area II |
| 330 | Patching Array |
| 899 | Orderly Queue |
| 224 | Basic Calculator |
| 782 | Transform to Chessboard |
| 174 | Dungeon Game |
| 123 | Best Time to Buy and Sell Stock III |
| 154 | Find Minimum in Rotated Sorted Array II |
| 668 | Kth Smallest Number in Multiplication Table |
| 952 | Largest Component Size by Common Factor |
| 85 | Maximal Rectangle |
| 1032 | Stream of Characters |
| 878 | Nth Magical Number |
| 902 | Numbers At Most N Given Digit Set |
| 1463 | Cherry Pickup II |
| 1345 | Jump Game IV |
| 1510 | Stone Game IV |
| 127 | Word Ladder |
| 410 | Split Array Largest Sum |
| 629 | K Inverse Pairs Array |
| 1074 | Number of Submatrices That Sum to Target |
| 1531 | String Compression II |
| 1335 | Minimum Difficulty of a Job Schedule |
| 76 | Minimum Window Substring |
| 2136 | Earliest Possible Day of Full Bloom |
| 2193 | Minimum Number of Moves to Make Palindrome |
| 1235 | Maximum Profit in Job Scheduling |
| 446 | Arithmetic Slices II - Subsequence |
| 124 | Binary Tree Maximum Path Sum |
| 600 | Non-negative Integers without Consecutive Ones |
| 72 | Edit Distance |
| 1340 | Jump Game V |
| 403 | Frog Jump |
| 188 | Best Time to Buy and Sell Stock IV |
| 149 | Max Points on a Line |
| 140 | Word Break II |