/leetcode-go

leetcode solution repo

Primary LanguageGo

Solution of LeetCode

plan

Solution # Title Difficulty TimeComplexity SpaceComplexity
0001 Two Sum Easy O(n) O(n)
0002 Add Two Numbers Medium O(n) O(n)
0009 Palindrome Number Easy O(logn) O(1)
0015 3Sum Medium
0020 Valid Parentheses Easy
0021 Merge Two Sorted Lists Easy O(n) O(1)
0025 Reverse Nodes In K-Group Hard
0026 Remove Duplicates from Sorted Array Easy
0028 Implement strStr() Easy O(n) O(n)
0048 Rotate Image Medium
0054 Spiral Matrix Medium
0055 Jump Game Medium
0056 Merge Intervals Medium
0058 Length of Last Word Easy
0091 Decode Ways Medium
0121 Best Time to Buy and Sell Stock Easy
0125 Valid Palindrome Easy
0144 Binary Tree Preorder Traversal Medium
0155 Min Stack Easy
0203 Remove Linked List Elements Easy
0206 Reverse Linked List Easy O(n) O(1)
0225 Implement Stack Use Queue Easy O(n) O(n)
0240 Count Primes Medium
0242 Valid Anagram Easy O(n) O(n)
0264 Ugly Number II Medium
0328 Odd Even Linked List Medium O(n) O(1)
0344 Reverse String Easy
0448 Find All Numbers Disappeared in an Array Easy
0589 N-ary Tree Preorder Traversal Easy
0590 N-ary Tree Postorder Traversal Easy
0739 Daily Temperatures Medium
0876 Middle of the Linked List Easy
1047 Remove All Adjacent Duplicates In String Easy
1108 Defanging an IP Address Easy
1502 Can Make Arithmetic Progression From Sequence Easy O(n) O(1)