Skip to content

w3csky/leetcode

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”₯ Leetcode πŸ”₯

Travis Build Maintainability TestCoverage Insight.io PRs Welcome code style: prettier

Practice make Perfect

  • πŸŽ‰ Unit test with jest
  • ✨ Simple code
  • 🎨 Readable code

Logo

Getting Start

git clone https://github.com/tangweikun/leetcode.git
cd leetcode
npm install
npm run test // also you can run `npm run watch`

Recommend

Contents

# Title README Difficulty LeetCode TAGS
1 compare-version-numbers πŸ“— Easy LeetCode String
2 TODO: πŸ“— Easy
3 TODO: πŸ“— Easy
4 length-of-last-word πŸ“— Easy LeetCode String
5 baseball-game πŸ“— Easy LeetCode Stack
6 132-pattern πŸ“— Medium LeetCode Stack
7 LongestCommonPrefix πŸ“— Easy LeetCode String
8 longest-substring-without-repeating-characters πŸ“— Easy LeetCode String
9 TODO: πŸ“— Easy
10 min-stack πŸ“— Medium LeetCode
11 PalindromeNumber πŸ“— Easy Math
12 PrimeNumber πŸ“— Easy
13 SearchInsertPosition πŸ“— Easy LeetCode BinarySearch
14 JudgeRouteCircle πŸ“— Easy LeetCode String
15 SwapPosition πŸ“— Easy
16 UnionList πŸ“— Easy
17 ValidParentheses πŸ“— Easy LeetCode
18 IsPowerOf2 πŸ“— Easy LeetCode
19 BitCount πŸ“— Easy
20 MissingInteger πŸ“— Easy
21 OddTimes πŸ“— Easy
22 GreatestCommonDivisor πŸ“— Easy
23 ClimbingStairs πŸ“— Easy LeetCode
24 RemoveElement πŸ“— Easy LeetCode Array
25 ImplementStr πŸ“— Easy LeetCode String
26 LargestNumberAtLeastTwiceOfOthers πŸ“— Easy LeetCode Array
27 Pow πŸ“— Easy Math
28 MinQueue πŸ“— Medium
29 RemoveDuplicates πŸ“— Easy LeetCode Two Pointer
30 RomanToInteger πŸ“— Easy LeetCode Math
31 MaximumSubArray πŸ“— Easy LeetCode Array
32 PlusOne πŸ“— Easy LeetCode Math
33 AddBinary πŸ“— Easy LeetCode Math
34 Sqrt πŸ“— Easy LeetCode Math
35 MergeSortedArray πŸ“— Easy LeetCode Array
36 CountAndSay πŸ“— Easy LeetCode String
37 BestTimeToBuyAndSellStock πŸ“— Easy LeetCode Array
38 BestTimeToBuyAndSellStock2 πŸ“— Easy LeetCode Array
39 ValidPalindrome πŸ“— Easy LeetCode
40 SingleNumber πŸ“— Easy LeetCode
41 TwoSum2 πŸ“— Easy LeetCode Array
42 RotateArray πŸ“— Easy LeetCode Array
43 ReverseBits πŸ“— Easy LeetCode
44 AsteroidCollision πŸ“— Medium LeetCode Stack
45 FractionalSimplify πŸ“— Easy
46 FractionCalculate πŸ“— Easy
47 HammingWeight πŸ“— Easy LeetCode
48 HappyNumber πŸ“— Easy LeetCode Math
49 FizzBuzz πŸ“— Easy LeetCode
50 HammingDistance πŸ“— Easy LeetCode
51 IntersectionOfTwoArrays πŸ“— Easy LeetCode
52 IntersectionOfTwoArrays2 πŸ“— Easy LeetCode
53 IslandPerimeter πŸ“— Easy LeetCode
54 KeyboardRow πŸ“— Easy LeetCode
55 LongestPalindrome πŸ“— Easy LeetCode
56 LongestContinuousIncreasingSubsequence πŸ“— Easy LeetCode Array
57 LongestHarmoniousSubsequence πŸ“— Easy LeetCode
58 FirstUniqueCharacterInAString πŸ“— Easy LeetCode String
59 FindTheDifference πŸ“— Easy LeetCode
60 AddDigits πŸ“— Easy LeetCode Math
61 AddStrings πŸ“— Easy LeetCode Math
62 ArrayPosition1 πŸ“— Easy LeetCode Array
63 ArrangingCoins πŸ“— Easy LeetCode Math
64 ContainsDuplicate πŸ“— Easy LeetCode Array
65 ContainsDuplicate2 πŸ“— Easy LeetCode Array
66 CountBinarySubstrings πŸ“— Easy LeetCode String
67 DetectCapital πŸ“— Easy LeetCode String
68 DistributeCandies πŸ“— Easy LeetCode
69 CountPrimes πŸ“— Easy LeetCode Math
70 Base7 πŸ“— Easy LeetCode
71 PowerOfThree πŸ“— Easy LeetCode Math
72 PowerOfFour πŸ“— Easy LeetCode math
73 NumberOfSegmentsInAString πŸ“— Easy LeetCode String
74 ReverseString πŸ“— Easy LeetCode
75 ReverseString2 πŸ“— Easy LeetCode
76 ReverseWordsInAString3 πŸ“— Easy LeetCode
77 ReverseVowelsOfAString πŸ“— Easy LeetCode
78 UglyNumber πŸ“— Easy LeetCode Math
79 ValidAnagram πŸ“— Easy LeetCode
80 ValidPalindrome2 πŸ“— Easy LeetCode
81 WordPattern πŸ“— Easy LeetCode
82 BinaryNumberWithAlternatingBits πŸ“— Easy LeetCode
83 FindAllAnagramsInAString πŸ“— Easy LeetCode
84 FactorialTrailingZeroes πŸ“— Easy LeetCode Math
85 FindSmallestLetterGreaterThanTarget πŸ“— Easy LeetCode
86 FindPivotIndex πŸ“— Easy LeetCode Array
87 LicenseKeyFormatting πŸ“— Easy LeetCode
88 LongestUncommonSubsequence1 πŸ“— Easy LeetCode String
89 MajorityElement πŸ“— Easy LeetCode Array
90 PerfectNumber πŸ“— Easy LeetCode Math
91 PrimeNumberOfSetBitsInBinaryRepresentation πŸ“— Easy LeetCode
92 NumberComplement πŸ“— Easy LeetCode
93 MoveZeroes πŸ“— Easy LeetCode Array
94 RelativeRanks πŸ“— Easy LeetCode
95 ValidPerfectSquare πŸ“— Easy LeetCode Math
96 StringCompression πŸ“— Easy LeetCode
97 studentAttendanceRecord1 πŸ“— Easy LeetCode
98 MaxConsecutiveOnes πŸ“— Easy LeetCode Array
99 MaximumAverageSubarray πŸ“— Easy LeetCode Array
100 MinimumIndexSumOfTwoLists πŸ“— Easy LeetCode
101 SumOfSquareNumbers πŸ“— Easy LeetCode Math
102 SetMismatch πŸ“— Easy LeetCode Math
103 FindTheDuplicateNumber πŸ“— Medium LeetCode Math
104 SelfDividingNumbers πŸ“— Easy LeetCode Math
105 MissingNumber πŸ“— Easy LeetCode Math
106 MaximumProductOfThreeNumbers πŸ“— Easy LeetCode Math
107 ComplexNumberMultiplication πŸ“— Medium LeetCode Math
108 UglyNumber2 πŸ“— Medium LeetCode Math, DP
109 ValidSquare πŸ“— Medium LeetCode Math
110 1-bit-and-2-bit-characters πŸ“— Easy LeetCode Array
111 CanPlaceFlowers πŸ“— Easy LeetCode Array
112 FindAllNumbersDisappearedInAnArray πŸ“— Easy LeetCode Array
113 ContainerWithMostWater πŸ“— Medium LeetCode Array
114 DegreeOfAnArray πŸ“— Easy LeetCode Array
115 FindAllDuplicatesInAnArray πŸ“— Easy LeetCode Array
116 FindMinimumInRotatedSortedArray πŸ“— Easy LeetCode Array
117 FindMinimumInRotatedSortedArray2 πŸ“— Easy LeetCode Array
118 FindPeakElement πŸ“— Medium LeetCode Array
119 JumpGame πŸ“— Medium LeetCode DP
120 JumpGame2 πŸ“— Hard LeetCode DP
121 MaxChunksToMakeSorted πŸ“— Medium LeetCode Array
122 maximumSwap πŸ“— Medium LeetCode Array
123 MinCostClimbingStairs πŸ“— Medium LeetCode DP
124 MinimumSizeSubarraySum πŸ“— Medium LeetCode Array
125 RemoveDuplicatesFromSortedArray2 πŸ“— Medium LeetCode Array
126 SearchForARange πŸ“— Medium LeetCode Array
127 SubarrayProductLessThanK πŸ“— Medium LeetCode Array
128 DailyTemperatures πŸ“— Medium LeetCode Stack
129 SumOfTwoIntegers πŸ“— Easy LeetCode Bit
130 JewelsAndStones πŸ“— Easy LeetCode HashTable
131 NumberOfBoomerangs πŸ“— Easy LeetCode HashTable
132 IsomorphicStrings πŸ“— Easy LeetCode HashTable
133 CountingBits πŸ“— Easy LeetCode Bit
134 ValidTriangleNumber πŸ“— Medium LeetCode Array
135 RepeatedSubstringPattern πŸ“— Easy LeetCode String
136 MaximumDepthOfBinaryTree πŸ“— Easy LeetCode BinaryTree
137 MergeTwoBinaryTrees πŸ“— Easy LeetCode BinaryTree
138 AverageOfLevelsInBinaryTree πŸ“— Easy LeetCode BinaryTree
139 FindDuplicateSubtrees πŸ“— Medium LeetCode BinaryTree
140 MinimumWindowSubstring πŸ“— Hard LeetCode String
141 InvertBinaryTree πŸ“— Easy LeetCode BinaryTree
142 TwoSum4 πŸ“— Easy LeetCode BinaryTree
143 SameTree πŸ“— Easy LeetCode BinaryTree
144 SumOfLeftLeaves πŸ“— Easy LeetCode BinaryTree
145 TrimABinarySearchTree πŸ“— Easy LeetCode BinaryTree
146 ToeplitzMatrix πŸ“— Easy LeetCode Array
147 ReshaphTeMatrix πŸ“— Easy LeetCode Array
148 NextGreaterElement πŸ“— Easy LeetCode Array
149 NimGame πŸ“— Easy LeetCode BrainTeaser
150 RotatedDigits πŸ“— Easy LeetCode String
151 ExcelSheetColumnNumber πŸ“— Easy LeetCode Math
152 RansomNote πŸ“— Easy LeetCode String
153 K-diffPairsInAnArray πŸ“— Easy LeetCode Array
154 ThirdMaximumNumber πŸ“— Easy LeetCode Array
155 SingleElementInASortedArray πŸ“— Medium LeetCode Array
156 SingleNumber3 πŸ“— Medium LeetCode Array
157 ArithmeticSlices πŸ“— Medium LeetCode Math,DP
158 PalindromicSubstrings πŸ“— Medium LeetCode String,DP
159 MaximumXOROfTwoNumbersInAnArray πŸ“— Medium LeetCode Bit
160 SortCharactersByFrequency πŸ“— Medium LeetCode HashTable
161 RotateString πŸ“— Medium LeetCode String
162 ProductOfArrayExceptSelf πŸ“— Medium LeetCode Array
163 TeemoAttacking πŸ“— Medium LeetCode Array
164 QueueReconstructionByHeight πŸ“— Medium LeetCode Greedy
165 4sum-ii πŸ“— Medium LeetCode HashTable
166 01-matrix πŸ“— Medium LeetCode HashTable
167 3sum πŸ“— Medium LeetCode TwoPointers
168 3sum-closest πŸ“— Medium LeetCode TwoPointers
169 4Sum πŸ“— Medium LeetCode TwoPointers
170 AddTwoNumbers πŸ“— Medium LeetCode LinkedList
171 AddTwoNumbers2 πŸ“— Medium LeetCode LinkedList
172 AddAndSearchWordDataStructureDesign πŸ“— Medium LeetCode LinkedList
173 AdditiveNumber πŸ“— Medium LeetCode String
174 AssignCookies πŸ“— Easy LeetCode Greedy
175 BasicCalculator πŸ“— Medium LeetCode Stack
176 BasicCalculator2 πŸ“— Medium LeetCode Stack
177 TargetSum πŸ“— Medium LeetCode DP
178 ImplementQueueUsingStacks πŸ“— Easy LeetCode Stack
179 ImplementStackUsingQueues πŸ“— Easy LeetCode Stack
180 NextGreaterElement2 πŸ“— Medium LeetCode Stack
181 BinaryTreeTilt πŸ“— Easy LeetCode Tree
182 DiameterOfBinaryTree πŸ“— Easy LeetCode Tree
183 SymmetricTree πŸ“— Easy LeetCode Tree
184 SecondMinimumNodeInABinaryTree πŸ“— Easy LeetCode Tree
185 SubTreeOfAnotherTree πŸ“— Easy LeetCode Tree
186 BinaryTreePaths πŸ“— Easy LeetCode DFS
187 PathSum πŸ“— Easy LeetCode DFS
188 MinimumDepthOfBinaryTree πŸ“— Easy LeetCode DFS
189 FindBottomLeftTreeValue πŸ“— Medium LeetCode DFS
190 DecodeString πŸ“— Medium LeetCode DFS,Stack
191 FindLargestvalueInEachTreeRow πŸ“— Medium LeetCode DFS
192 MaxAreaOfIsLand πŸ“— Easy LeetCode DFS
193 FloodFill πŸ“— Easy LeetCode DFS
194 BalancedBinaryTree πŸ“— Easy LeetCode DFS
195 FriendCircles πŸ“— Medium LeetCode DFS
196 HouseRobber3 πŸ“— Medium LeetCode DFS
197 IncreasingSubsequences πŸ“— Medium LeetCode DFS
198 SumRootToLeafNumbers πŸ“— Medium LeetCode DFS
199 NumberOfIsLands πŸ“— Medium LeetCode DFS
200 PathSum2 πŸ“— Medium LeetCode DFS
201 MatchsticksToSquare πŸ“— Medium LeetCode DFS
202 TwoSum πŸ“— Easy LeetCode Array
203 UniqueMorseCodeWords πŸ“— Easy LeetCode Hash
204 ImageSmoother πŸ“— Easy LeetCode Array
205 PascalsTriangle πŸ“— Easy LeetCode Array
206 PascalsTriangle2 πŸ“— Easy LeetCode Array
207 ShortestUnsortedContinuousSubarray πŸ“— Easy LeetCode Array
208 Non-decreasingArray πŸ“— Easy LeetCode Array
209 RangeAddition2 πŸ“— Easy LeetCode Math
210 RepeatedStringMatch πŸ“— Easy LeetCode Math
211 HouseRobber πŸ“— Easy LeetCode DP
212 MinimumASCIIDeleteSumForTwoStrings πŸ“— Medium LeetCode DP
213 Maximum Length of Pair Chain πŸ“— Medium LeetCode DP,Greedy
214 IntegerBreak πŸ“— Medium LeetCode DP
215 CountNumbersWithUniqueDigits πŸ“— Medium LeetCode DP
216 BestTimetoBuyAndSellStockWithTransactionFee πŸ“— Medium LeetCode DP,Greedy
217 ShoppingOffers πŸ“— Medium LeetCode DP,DFS
218 PredictTheWinner πŸ“— Medium LeetCode DP
219 2-keys-keyboard πŸ“— Medium LeetCode DP
220 IsSubsequence πŸ“— Medium LeetCode DP
221 delete-and-earn πŸ“— Medium LeetCode DP
222 longest-palindromic-subsequence πŸ“— Medium LeetCode DP
223 combination-sum-iv πŸ“— Medium LeetCode DP
224 maximum-length-of-repeated-subarray πŸ“— Medium LeetCode DP
225 minimum-path-sum πŸ“— Medium LeetCode DP
226 largest-sum-of-averages πŸ“— Medium LeetCode DP
227 longest-increasing-subsequence πŸ“— Medium LeetCode DP

Collaborators


weikun tang

About

⚑ Leetcode Solutions

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%