Skip to content

lancefrench/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository of solutions to LeetCode problems in Go.

# Title Solution Time Space Difficulty Tag Notes Needs Solution
0001 Two Sum golang Easy
0002 Add Two Numbers golang Medium
0003 Longest Substring Without Repeating Characters golang Medium
0004 Median of Two Sorted Arrays golang Hard *
0005 Longest Palindromic Substring golang Medium
0006 Zigzag Conversion golang Medium *
0007 Reverse Integer golang Medium *
0008 String to Integer (atoi) golang Medium
0009 Palindrome Number golang Easy *
0010 Regular Expression Matching golang Hard *
0011 Container With Most Water golang Medium
0012 Integer to Roman golang Medium
0013 Roman to Integer golang Easy
0014 Longest Common Prefix golang Easy *
0015 3 Sum golang Medium
0016 3 Sum Closest golang O(n^2) O(n) Medium
0017 Letter Combinations of a Phone Number golang O(n * 4^n) O(n) Medium *
0018 4Sum golang O(n^3) O(n) Medium
0019 Remove Nth Node From End of List golang Medium *
0020 Valid Parentheses golang Easy *
0021 Merge Two Sorted Lists golang Easy *
0022 Generate Parentheses golang Medium *
0023 Merge k Sorted Lists golang Hard *
0024 Swap Nodes in Pairs golang Medium *
0025 Reverse Nodes in k-Group golang Hard *
0026 Remove Duplicates from Sorted Array golang Easy *
0027 Remove Element golang Easy *
0028 Find the Index of the First Occurrence in a String golang Easy *
0029 Divide Two Integers golang Medium
0030 Substring with Concatenation of All Words golang Hard *
0031 Next Permutation golang Medium *
0032 Longest Valid Parentheses golang Hard *
0033 Search in Rotated Sorted Array golang Medium *
0034 Find First and Last Position of Element in Sorted Array golang Medium *
0035 Search Insert Position golang Easy *
0036 Valid Sudoku golang Medium *
0037 Sudoku Solver golang Hard *
0038 Count and Say golang Easy *
0039 Combination Sum golang Medium *
0040 Combination Sum II golang Medium *
0041 First Missing Positive golang Hard *
0042 Trapping Rain Water golang O(n) O(1) Hard
0043 Multiply Strings golang Medium *
0044 Wildcard Matching golang Hard *
0045 Jump Game II golang Medium
0046 Permutations golang Medium *
0047 Permutations II golang Medium *
0048 Rotate Image golang Medium *
0049 Group Anagrams golang Medium
0050 Pow(x, n) golang Medium *
0051 N-Queens golang Hard *
0052 N-Queens II golang Hard *
0053 Maxiumum Subarray golang Easy
0054 Spiral Matrix golang Medium *
0055 Jump Game golang Medium *
0056 Merge Intervals golang Medium *
0057 Insert Interval golang Hard *
0058 Length of Last Word golang Easy *
0059 Spiral Matrix II golang Medium *
0060 Permutation Sequence golang Medium *
0061 Rotate List golang Medium *
0062 Unique Paths golang Medium *
0063 Unique Paths II golang Medium *
0064 Minimum Path Sum golang Medium *
0065 Valid Number golang Hard *
0066 Plus One golang Easy *
0067 Add Binary golang Easy *
0068 Text Justification golang Hard *
0069 Sqrt(x) golang Easy *
0070 Climbing Stairs golang Easy *
0071 Simplify Path golang Medium
0072 Edit Distance golang Hard *
0073 Set Matrix Zeroes golang Medium *
0074 Search a 2D Matrix golang Medium *
0075 Sort Colors golang Medium *
0076 Minimum Window Substring golang Hard *
0077 Combinations golang Medium *
0078 Subsets golang Medium *
0079 Word Search golang Medium *
0080 Remove Duplicates from Sorted Array II golang Medium *
0081 Search in Rotated Sorted Array II golang Medium *
0082 Remove Duplicates from Sorted List II golang Medium *
0083 Remove Duplicates from Sorted List golang Easy *
0084 Largest Rectangle in Histogram golang Hard *
0085 Maximal Rectangle golang Hard *
0086 Partition List golang O(n) O(1) Medium
0087 Scramble String golang Hard *
0089 Gray Code golang Medium *
0090 Subsets II golang Medium *
0091 Decode Ways golang Medium *
0092 Reverse Linked List II golang Medium *
0093 Restore IP Addresses golang Medium *
0094 Binary Tree Inorder Traversal golang Medium *
0095 Unique Binary Search Trees II golang Medium *
0096 Unique Binary Search Trees golang Medium *
0097 Interleaving String golang Medium *
0098 Validate Binary Search Tree golang Medium *
0099 Recover Binary Search Tree golang Hard *
0100 Same Tree golang Easy *
0101 Symmetric Tree golang Easy *
0102 Binary Tree Level Order Traversal golang Medium *
0103 Binary Tree Zigzag Level Order Traversal golang Medium *
0104 Maximum Depth of Binary Tree golang Easy *
0105 Construct Binary Tree from Preorder and Inorder Traversal golang Medium *
0106 Construct Binary Tree from Inorder and Postorder Traversal golang Medium *
0107 Binary Tree Level Order Traversal II golang Easy *
0108 Convert Sorted Array to Binary Search Tree golang Easy *
0109 Convert Sorted List to Binary Search Tree golang Medium *
0110 Balanced Binary Tree golang Easy *
0111 Minimum Depth of Binary Tree golang Easy *
0112 Path Sum golang Easy *
0113 Path Sum II golang Medium *
0114 Flatten Binary Tree to Linked List golang Medium *
0115 Distinct Subsequences golang Hard *
0116 Populating Next Right Pointers in Each Node golang Medium *
0117 Populating Next Right Pointers in Each Node II golang Medium *
0118 Pascal's Triangle golang Easy *
0119 Pascal's Triangle II golang Easy *
0120 Triangle golang Medium *
0121 Best Time to Buy and Sell Stock golang Easy *
0122 Best Time to Buy and Sell Stock II golang Easy *
0123 Best Time to Buy and Sell Stock III golang Hard *
0124 Binary Tree Maximum Path Sum golang Hard *
0125 Valid Palindrome golang Easy *
0126 Word Ladder II golang Hard *
0127 Word Ladder golang Medium *
0128 Longest Consecutive Sequence golang Hard *
0129 Sum Root to Leaf Numbers golang Medium *
0130 Surrounded Regions golang Medium *
0131 Palindrome Partitioning golang Medium *
0132 Palindrome Partitioning II golang Hard *
0133 Clone Graph golang Medium *
0134 Gas Station golang Medium *
0135 Candy golang Hard *
0136 Single Number golang O(n) O(1) Easy
0137 Single Number II golang O(n) O(1) Medium
0138 Copy List with Random Pointer golang Medium
0139 Word Break golang Medium *
0140 Word Break II golang Hard *
0141 Linked List Cycle golang O(n) O(1) Easy
0142 Linked List Cycle II golang O(n) O(1) Medium
0143 Reorder List golang O(n) O(1) Medium
0144 Binary Tree Preorder Traverbsal golang O(n) O(1) Medium
0146 LRU Cache golang Medium *
0147 Insertion Sort List golang Medium *
0160 Intersection of Two Linked Lists golang Easy *
0191 Number of 1 Bits golang Easy *
0199 Binary Tree Right Side View golang Medium Binary Tree
0234 Palindrome Linked List golang Easy *
0240 Search a 2D Matrix II golang Medium
0242 Valid Anagram golang Easy Strings, bytes, runes, and characters in Go
0268 Missing Number golang Easy *
0284 Peeking Iterator golang Medium Iterators in Go
0322 Coin Change golang Medium *
0329 Longest Increasing Path in a Matrix golang Hard *
0341 Flatten Nested List Iterator golang Medium *
0349 Intersection of Two Arrays golang O(n + m) O(n + m) Easy
0354 Russian Doll Envelopes golang Hard *
0376 Wiggle Subsequence golang Medium *
0377 Combination Sum IV golang Medium *
0413 Arithmetic Slices golang Medium Dynamic Programming
0417 Pacific Atlantic Water Flow golang Medium *
0423 Reconstruct Original Digits from English golang Medium *
0474 Ones and Zeroes golang Medium *
0478 Generate Random Point in a Cirlcle golang Medium *
0509 Fibonacci Number golang Easy *
0524 Longest Word in Dictionary through Deleting golang Medium
0535 Encode and Decode TinyURL golang Medium *
0538 Convert BST to Greater Tree golang Medium Binary Tree
0554 Brick Wall golang Medium *
0575 Distribute Candies golang Easy
0581 Shortest Unsorted Continuous Subarray golang Medium
0594 Longest Harmonious Subsequence golang Easy Hash Table Hash Tables *
0622 Design Circular Queue golang Medium *
0623 Add One Row to Tree golang Medium *
0637 Average of Levels in Binary Tree golang Easy *
0645 Set Mismatch golang Easy *
0647 Palindromic Substrings golang Medium *
0665 Non-decreasing Array golang Medium *
0667 Beautiful Arrangement II golang Medium *
0669 Trim a Binary Search Tree golang O(n) O(1) Medium Binary Tree Binary Search Trees
0695 Max Area of Island golang Medium *
0706 Design Hashmap golang Easy *
0714 Best Time to Buy and Sell Stock with Transaction Fee golang Medium *
0775 Global and Local Inversions golang Medium *
0784 Letter Case Permutation golang Medium Bitwise Operation Bit Hacking with Go
0785 Is Graph Bipartite? golang Medium
0820 Short Encoding of Words golang Medium *
0821 Shortest Distance to a Character golang Easy
0823 Binary Tree With Factors golang Medium *
0841 Keys and Rooms golang Medium *
0856 Score of Parentheses golang O(n) Medium
0869 Reordered Power of 2 golang Medium *
0870 Advantage Shuffle golang Medium *
0895 Maximum Frequency Stack golang Hard *
0916 Word Subsets golang Medium *
0923 3Sum With Multiplicity golang Medium *
0936 Stamping The Sequence golang Hard *
0946 Validate Stack Sequences golang Medium
0953 Verifying an Alien Dictionary golang Easy *
0966 Vowel Spellchecker golang Medium *
0991 Broken Calculator golang Medium
1091 Shortest Path in Binary Matrix golang Medium
1151 Minimum Swaps to Group All 1's Together golang Medium *
1209 Remove All Adjacent Duplicates in String II golang Medium *
1249 Minimum Remove to Make Valid Parentheses golang Medium
1302 Deepest Leaves Sum golang Medium
1337 The K Weakest Rows in a Matrix golang Easy
1342 Number of Steps to Reduce a Number to Zero golang Easy
1396 Design Underground System (./golang/design-underground-system/design-underground-system.go) Medium *
1461 Check If a String Contains All Binary Codes of Size K golang Medium *
1551 Minimum Operations to Make Array Equal golang Medium *
1704 Determine if String Halves Are Alike golang Easy *
1721 Swapping Nodes in a Linked List golang Medium *

About

Solutions to leetcode problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages