Skip to content

πŸ•·οΈπŸ•·οΈ Leetcode Solutions written in javascript

Notifications You must be signed in to change notification settings

loatheb/leetcode-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

✏️ Leetcode Solutions with javascript

Update time: 2016-11-24 21:14:45

Auto created by leetcode_generate Usage

I have solved 141 / 429 problems while there are 78 problems still locked.

If you have any question, please give me an issue.

If you are loving solving problems in leetcode, please contact me to enjoy it together!

(Notes: πŸ”’ means you need to buy a book from Leetcode to unlock the problem)

# Title Source Code Article Difficulty
1 two-sum javascript πŸ“ Easy
2 add-two-numbers javascript πŸ“ Medium
3 longest-substring-without-repeating-characters javascript πŸ“ Medium
4 median-of-two-sorted-arrays javascript Hard
5 longest-palindromic-substring javascript πŸ“ Medium
6 zigzag-conversion javascript Easy
7 reverse-integer javascript Easy
8 string-to-integer-atoi Easy
9 palindrome-number javascript Easy
10 regular-expression-matching Hard
11 container-with-most-water πŸ“ Medium
12 integer-to-roman javascript Medium
13 roman-to-integer javascript Easy
14 longest-common-prefix javascript πŸ“ Easy
15 3sum javascript Medium
16 3sum-closest Medium
17 letter-combinations-of-a-phone-number Medium
18 4sum Medium
19 remove-nth-node-from-end-of-list javascript πŸ“ Easy
20 valid-parentheses javascript Easy
21 merge-two-sorted-lists javascript Easy
22 generate-parentheses Medium
23 merge-k-sorted-lists javascript Hard
24 swap-nodes-in-pairs javascript Easy
25 reverse-nodes-in-k-group javascript Hard
26 remove-duplicates-from-sorted-array javascript πŸ“ Easy
27 remove-element javascript πŸ“ Easy
28 implement-strstr javascript Easy
29 divide-two-integers Medium
30 substring-with-concatenation-of-all-words Hard
31 next-permutation πŸ“ Medium
32 longest-valid-parentheses Hard
33 search-in-rotated-sorted-array javascript Hard
34 search-for-a-range javascript Medium
35 search-insert-position javascript Medium
36 valid-sudoku javascript Easy
37 sudoku-solver Hard
38 count-and-say Easy
39 combination-sum Medium
40 combination-sum-ii Medium
41 first-missing-positive javascript Hard
42 trapping-rain-water Hard
43 multiply-strings Medium
44 wildcard-matching Hard
45 jump-game-ii Hard
46 permutations Medium
47 permutations-ii Medium
48 rotate-image Medium
49 anagrams javascript Medium
50 powx-n javascript Medium
51 n-queens Hard
52 n-queens-ii Hard
53 maximum-subarray Medium
54 spiral-matrix Medium
55 jump-game javascript πŸ“ Medium
56 merge-intervals Hard
57 insert-interval Hard
58 length-of-last-word javascript Easy
59 spiral-matrix-ii Medium
60 permutation-sequence Medium
61 rotate-list javascript Medium
62 unique-paths Medium
63 unique-paths-ii Medium
64 minimum-path-sum Medium
65 valid-number Hard
66 plus-one javascript Easy
67 add-binary javascript Easy
68 text-justification Hard
69 sqrtx javascript Medium
70 climbing-stairs javascript Easy
71 simplify-path Medium
72 edit-distance Hard
73 set-matrix-zeroes javascript Medium
74 search-a-2d-matrix Medium
75 sort-colors javascript Medium
76 minimum-window-substring Hard
77 combinations Medium
78 subsets javascript Medium
79 word-search Medium
80 remove-duplicates-from-sorted-array-ii javascript Medium
81 search-in-rotated-sorted-array-ii javascript Medium
82 remove-duplicates-from-sorted-list-ii javascript Medium
83 remove-duplicates-from-sorted-list javascript πŸ“ Easy
84 largest-rectangle-in-histogram Hard
85 maximal-rectangle Hard
86 partition-list javascript Medium
87 scramble-string Hard
88 merge-sorted-array javascript Easy
89 gray-code Medium
90 subsets-ii javascript Medium
91 decode-ways Medium
92 reverse-linked-list-ii javascript Medium
93 restore-ip-addresses Medium
94 binary-tree-inorder-traversal javascript Medium
95 unique-binary-search-trees-ii Medium
96 unique-binary-search-trees Medium
97 interleaving-string Hard
98 validate-binary-search-tree Medium
99 recover-binary-search-tree Hard
100 same-tree javascript Easy
101 symmetric-tree javascript πŸ“ Easy
102 binary-tree-level-order-traversal Easy
103 binary-tree-zigzag-level-order-traversal Medium
104 maximum-depth-of-binary-tree javascript Easy
105 construct-binary-tree-from-preorder-and-inorder-traversal Medium
106 construct-binary-tree-from-inorder-and-postorder-traversal Medium
107 binary-tree-level-order-traversal-ii Easy
108 convert-sorted-array-to-binary-search-tree Medium
109 convert-sorted-list-to-binary-search-tree Medium
110 balanced-binary-tree Easy
111 minimum-depth-of-binary-tree javascript Easy
112 path-sum Easy
113 path-sum-ii Medium
114 flatten-binary-tree-to-linked-list Medium
115 distinct-subsequences Hard
116 populating-next-right-pointers-in-each-node Medium
117 populating-next-right-pointers-in-each-node-ii Hard
118 pascals-triangle javascript Easy
119 pascals-triangle-ii javascript Easy
120 triangle javascript Medium
121 best-time-to-buy-and-sell-stock javascript πŸ“ Easy
122 best-time-to-buy-and-sell-stock-ii javascript πŸ“ Medium
123 best-time-to-buy-and-sell-stock-iii Hard
124 binary-tree-maximum-path-sum Hard
125 valid-palindrome javascript Easy
126 word-ladder-ii Hard
127 word-ladder Medium
128 longest-consecutive-sequence javascript Hard
129 sum-root-to-leaf-numbers Medium
130 surrounded-regions Medium
131 palindrome-partitioning Medium
132 palindrome-partitioning-ii Hard
133 clone-graph Medium
134 gas-station Medium
135 candy Hard
136 single-number javascript Easy
137 single-number-ii javascript Medium
138 copy-list-with-random-pointer Hard
139 word-break Medium
140 word-break-ii Hard
141 linked-list-cycle javascript πŸ“ Easy
142 linked-list-cycle-ii javascript Medium
143 reorder-list javascript Medium
144 binary-tree-preorder-traversal javascript Medium
145 binary-tree-postorder-traversal javascript Hard
146 lru-cache Hard
147 insertion-sort-list javascript Medium
148 sort-list Medium
149 max-points-on-a-line Hard
150 evaluate-reverse-polish-notation javascript Medium
151 reverse-words-in-a-string javascript Medium
152 maximum-product-subarray javascript Medium
153 find-minimum-in-rotated-sorted-array javascript Medium
154 find-minimum-in-rotated-sorted-array-ii javascript Hard
155 min-stack javascript Easy
156 binary-tree-upside-down πŸ”’ Medium
157 read-n-characters-given-read4 πŸ”’ Easy
158 read-n-characters-given-read4-ii-call-multiple-times πŸ”’ Hard
159 longest-substring-with-at-most-two-distinct-characters πŸ”’ Hard
160 intersection-of-two-linked-lists javascript πŸ“ Easy
161 one-edit-distance πŸ”’ Medium
162 find-peak-element javascript Medium
163 missing-ranges πŸ”’ Medium
164 maximum-gap Hard
165 compare-version-numbers javascript Easy
166 fraction-to-recurring-decimal πŸ“ Medium
167 two-sum-ii-input-array-is-sorted javascript πŸ“ Medium
168 excel-sheet-column-title javascript Easy
169 majority-element javascript Easy
170 two-sum-iii-data-structure-design πŸ”’ Easy
171 excel-sheet-column-number javascript Easy
172 factorial-trailing-zeroes javascript Easy
173 binary-search-tree-iterator Medium
174 dungeon-game Hard
179 largest-number Medium
186 reverse-words-in-a-string-ii πŸ”’ Medium
187 repeated-dna-sequences Medium
188 best-time-to-buy-and-sell-stock-iv Hard
189 rotate-array javascript πŸ“ Easy
190 reverse-bits javascript Easy
191 number-of-1-bits javascript πŸ“ Easy
198 house-robber javascript πŸ“ Easy
199 binary-tree-right-side-view Medium
200 number-of-islands Medium
201 bitwise-and-of-numbers-range Medium
202 happy-number javascript Easy
203 remove-linked-list-elements javascript Easy
204 count-primes javascript Easy
205 isomorphic-strings javascript Easy
206 reverse-linked-list javascript πŸ“ Easy
207 course-schedule Medium
208 implement-trie-prefix-tree πŸ“ Medium
209 minimum-size-subarray-sum Medium
210 course-schedule-ii Medium
211 add-and-search-word-data-structure-design Medium
212 word-search-ii Hard
213 house-robber-ii Medium
214 shortest-palindrome Hard
215 kth-largest-element-in-an-array Medium
216 combination-sum-iii Medium
217 contains-duplicate javascript πŸ“ Easy
218 the-skyline-problem Hard
219 contains-duplicate-ii javascript πŸ“ Easy
220 contains-duplicate-iii πŸ“ Medium
221 maximal-square πŸ“ Medium
222 count-complete-tree-nodes Medium
223 rectangle-area javascript Easy
224 basic-calculator Hard
225 implement-stack-using-queues javascript πŸ“ Easy
226 invert-binary-tree javascript πŸ“ Easy
227 basic-calculator-ii Medium
228 summary-ranges javascript πŸ“ Medium
229 majority-element-ii javascript Medium
230 kth-smallest-element-in-a-bst Medium
231 power-of-two javascript Easy
232 implement-queue-using-stacks javascript πŸ“ Easy
233 number-of-digit-one Hard
234 palindrome-linked-list javascript Easy
235 lowest-common-ancestor-of-a-binary-search-tree javascript Easy
236 lowest-common-ancestor-of-a-binary-tree Medium
237 delete-node-in-a-linked-list javascript πŸ“ Easy
238 product-of-array-except-self javascript Medium
239 sliding-window-maximum Hard
240 search-a-2d-matrix-ii javascript Medium
241 different-ways-to-add-parentheses Medium
242 valid-anagram javascript πŸ“ Easy
243 shortest-word-distance πŸ”’ πŸ“ Easy
244 shortest-word-distance-ii πŸ”’ Medium
245 shortest-word-distance-iii πŸ”’ Medium
246 strobogrammatic-number πŸ”’ Easy
247 strobogrammatic-number-ii πŸ”’ Medium
248 strobogrammatic-number-iii πŸ”’ Hard
249 group-shifted-strings πŸ”’ Easy
250 count-univalue-subtrees πŸ”’ Medium
251 flatten-2d-vector πŸ”’ Medium
252 meeting-rooms πŸ”’ πŸ“ Easy
253 meeting-rooms-ii πŸ”’ Medium
254 factor-combinations πŸ”’ Medium
255 verify-preorder-sequence-in-binary-search-tree πŸ”’ Medium
256 paint-house πŸ”’ Medium
257 binary-tree-paths Easy
258 add-digits javascript Easy
259 3sum-smaller πŸ”’ πŸ“ Medium
260 single-number-iii javascript Medium
261 graph-valid-tree πŸ”’ Medium
263 ugly-number javascript Easy
264 ugly-number-ii Medium
265 paint-house-ii πŸ”’ Hard
266 palindrome-permutation πŸ”’ Easy
267 palindrome-permutation-ii πŸ”’ Medium
268 missing-number javascript Medium
269 alien-dictionary πŸ”’ Hard
270 closest-binary-search-tree-value πŸ”’ Easy
271 encode-and-decode-strings πŸ”’ Medium
272 closest-binary-search-tree-value-ii πŸ”’ Hard
273 integer-to-english-words Hard
274 h-index πŸ“ Medium
275 h-index-ii Medium
276 paint-fence πŸ”’ Easy
277 find-the-celebrity πŸ”’ Medium
278 first-bad-version javascript πŸ“ Easy
279 perfect-squares Medium
280 wiggle-sort πŸ”’ πŸ“ Medium
281 zigzag-iterator πŸ”’ Medium
282 expression-add-operators Hard
283 move-zeroes javascript πŸ“ Easy
284 peeking-iterator Medium
285 inorder-successor-in-bst πŸ”’ Medium
286 walls-and-gates πŸ”’ πŸ“ Medium
287 find-the-duplicate-number javascript Hard
288 unique-word-abbreviation πŸ”’ πŸ“ Easy
289 game-of-life Medium
290 word-pattern javascript Easy
291 word-pattern-ii πŸ”’ Hard
292 nim-game javascript πŸ“ Easy
293 flip-game πŸ”’ Easy
294 flip-game-ii πŸ”’ Medium
295 find-median-from-data-stream Hard
296 best-meeting-point πŸ”’ πŸ“ Hard
297 serialize-and-deserialize-binary-tree Hard
298 binary-tree-longest-consecutive-sequence πŸ”’ πŸ“ Medium
299 bulls-and-cows javascript Easy
300 longest-increasing-subsequence Medium
301 remove-invalid-parentheses Hard
302 smallest-rectangle-enclosing-black-pixels πŸ”’ Hard
303 range-sum-query-immutable javascript πŸ“ Easy
304 range-sum-query-2d-immutable πŸ“ Medium
305 number-of-islands-ii πŸ”’ Hard
306 additive-number Medium
307 range-sum-query-mutable πŸ“ Medium
308 range-sum-query-2d-mutable πŸ”’ Hard
309 best-time-to-buy-and-sell-stock-with-cooldown Medium
310 minimum-height-trees Medium
311 sparse-matrix-multiplication πŸ”’ Medium
312 burst-balloons Hard
313 super-ugly-number Medium
314 binary-tree-vertical-order-traversal πŸ”’ Medium
315 count-of-smaller-numbers-after-self Hard
316 remove-duplicate-letters Hard
317 shortest-distance-from-all-buildings πŸ”’ Hard
318 maximum-product-of-word-lengths Medium
319 bulb-switcher javascript Medium
320 generalized-abbreviation πŸ”’ Medium
321 create-maximum-number Hard
322 coin-change πŸ“ Medium
323 number-of-connected-components-in-an-undirected-graph πŸ”’ Medium
324 wiggle-sort-ii Medium
325 maximum-size-subarray-sum-equals-k πŸ”’ Medium
326 power-of-three javascript πŸ“ Easy
327 count-of-range-sum Hard
328 odd-even-linked-list javascript πŸ“ Medium
329 longest-increasing-path-in-a-matrix Hard
330 patching-array Hard
331 verify-preorder-serialization-of-a-binary-tree Medium
332 reconstruct-itinerary Medium
333 largest-bst-subtree πŸ”’ Medium
334 increasing-triplet-subsequence Medium
335 self-crossing Hard
336 palindrome-pairs Hard
337 house-robber-iii Medium
338 counting-bits javascript Medium
339 nested-list-weight-sum πŸ”’ πŸ“ Easy
340 longest-substring-with-at-most-k-distinct-characters πŸ”’ Hard
341 flatten-nested-list-iterator Medium
342 power-of-four javascript Easy
343 integer-break Medium
344 reverse-string javascript Easy
345 reverse-vowels-of-a-string javascript Easy
346 moving-average-from-data-stream πŸ”’ Easy
347 top-k-frequent-elements javascript Medium
348 design-tic-tac-toe πŸ”’ Medium
349 intersection-of-two-arrays javascript Easy
350 intersection-of-two-arrays-ii javascript Easy
351 android-unlock-patterns πŸ”’ πŸ“ Medium
352 data-stream-as-disjoint-intervals Hard
353 design-snake-game πŸ”’ Medium
354 russian-doll-envelopes Hard
355 design-twitter Medium
356 line-reflection πŸ”’ Medium
357 count-numbers-with-unique-digits Medium
358 rearrange-string-k-distance-apart πŸ”’ Hard
359 logger-rate-limiter πŸ”’ Easy
360 sort-transformed-array πŸ”’ Medium
361 bomb-enemy πŸ”’ Medium
362 design-hit-counter πŸ”’ Medium
363 max-sum-of-sub-matrix-no-larger-than-k Hard
364 nested-list-weight-sum-ii πŸ”’ Medium
365 water-and-jug-problem Medium
366 find-leaves-of-binary-tree πŸ”’ Medium
367 valid-perfect-square Medium
368 largest-divisible-subset Medium
369 plus-one-linked-list πŸ”’ Medium
370 range-addition πŸ”’ πŸ“ Medium
371 sum-of-two-integers javascript Easy
372 super-pow Medium
373 find-k-pairs-with-smallest-sums Medium
374 guess-number-higher-or-lower javascript πŸ“ Easy
375 guess-number-higher-or-lower-ii Medium
376 wiggle-subsequence πŸ“ Medium
377 combination-sum-iv Medium
378 kth-smallest-element-in-a-sorted-matrix Medium
379 design-phone-directory πŸ”’ Medium
380 insert-delete-getrandom-o1 Hard
381 insert-delete-getrandom-o1-duplicates-allowed Hard
382 linked-list-random-node Medium
383 ransom-note javascript Easy
384 shuffle-an-array Medium
385 mini-parser Medium
386 lexicographical-numbers Medium
387 first-unique-character-in-a-string javascript Easy
388 longest-absolute-file-path Medium
389 find-the-difference javascript Easy
390 elimination-game Medium
391 perfect-rectangle Hard
392 is-subsequence javascript Medium
393 utf-8-validation Medium
394 decode-string Medium
395 longest-substring-with-at-least-k-repeating-characters Medium
396 rotate-function javascript Easy
397 integer-replacement Medium
398 random-pick-index Medium
399 evaluate-division Medium
400 nth-digit javascript Easy
401 binary-watch javascript Easy
402 remove-k-digits Medium
403 frog-jump Hard
404 sum-of-left-leaves javascript Easy
405 convert-a-number-to-hexadecimal javascript Easy
406 queue-reconstruction-by-height Medium
407 trapping-rain-water-ii Hard
408 valid-word-abbreviation πŸ”’ Easy
409 longest-palindrome javascript Easy
410 split-array-largest-sum Hard
411 minimum-unique-word-abbreviation πŸ”’ Hard
412 fizz-buzz javascript Easy
413 arithmetic-slices Medium
414 third-maximum-number javascript Easy
415 add-strings javascript Easy
416 partition-equal-subset-sum Medium
417 pacific-atlantic-water-flow Medium
418 sentence-screen-fitting πŸ”’ Medium
419 battleships-in-a-board Medium
420 strong-password-checker Hard
421 maximum-xor-of-two-numbers-in-an-array Medium
422 valid-word-square πŸ”’ Easy
423 reconstruct-original-digits-from-english Medium
424 longest-repeating-character-replacement Medium
425 word-squares πŸ”’ Hard
432 all-oone-data-structure Hard
435 non-overlapping-intervals Medium
436 find-right-interval Medium
437 path-sum-iii Easy
438 find-all-anagrams-in-a-string Easy
439 ternary-expression-parser πŸ”’ Medium
440 k-th-smallest-in-lexicographical-order Hard
441 arranging-coins javascript Easy
444 sequence-reconstruction πŸ”’ Medium
446 arithmetic-slices-ii-subsequence Hard
447 number-of-boomerangs Easy
452 minimum-number-of-arrows-to-burst-balloons Medium
453 minimum-moves-to-equal-array-elements Easy
454 4sum-ii Medium
455 assign-cookies Easy
456 132-pattern Medium
459 repeated-substring-pattern Easy
462 minimum-moves-to-equal-array-elements-ii Medium
463 island-perimeter Easy
464 can-i-win Medium
465 optimal-account-balancing πŸ”’ Hard

About

πŸ•·οΈπŸ•·οΈ Leetcode Solutions written in javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published