Skip to content

agermain/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

62 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Leetcode Solutions with Golang, Java, Python3

LeetCode

Last updated: 2023-02-12 12:18:33

I have solved 187 out of 2332 problems. If you have any suggestions, feedback is appreciated.

# Title Source Code Article Difficulty
1 two-sum Golang Python3 πŸ“ Easy
2 add-two-numbers Python3 πŸ“ Medium
9 palindrome-number Golang πŸ“ Easy
13 roman-to-integer Java πŸ“ Easy
14 longest-common-prefix Java πŸ“ Easy
20 valid-parentheses Java πŸ“ Easy
21 merge-two-sorted-lists Golang πŸ“ Easy
24 swap-nodes-in-pairs Java Golang πŸ“ Medium
36 valid-sudoku Python3 πŸ“ Medium
48 rotate-image Java πŸ“ Medium
49 group-anagrams Python3 πŸ“ Medium
53 maximum-subarray Java Python3 πŸ“ Medium
59 spiral-matrix-ii Golang πŸ“ Medium
69 sqrtx Java Python3 πŸ“ Easy
74 search-a-2d-matrix Python3 πŸ“ Medium
75 sort-colors Golang πŸ“ Medium
80 remove-duplicates-from-sorted-array-ii Golang πŸ“ Medium
83 remove-duplicates-from-sorted-list Java Python3 πŸ“ Easy
84 largest-rectangle-in-histogram Python3 πŸ“ Hard
88 merge-sorted-array Python3 πŸ“ Easy
91 decode-ways Python3 πŸ“ Medium
94 binary-tree-inorder-traversal Java πŸ“ Easy
98 validate-binary-search-tree Python3 πŸ“ Medium
102 binary-tree-level-order-traversal Python3 πŸ“ Medium
103 binary-tree-zigzag-level-order-traversal Python3 πŸ“ Medium
104 maximum-depth-of-binary-tree Java Python3 Golang πŸ“ Easy
107 binary-tree-level-order-traversal-ii Python3 πŸ“ Medium
108 convert-sorted-array-to-binary-search-tree Java πŸ“ Easy
110 balanced-binary-tree Python3 πŸ“ Easy
116 populating-next-right-pointers-in-each-node Python3 πŸ“ Medium
117 populating-next-right-pointers-in-each-node-ii Python3 πŸ“ Medium
118 pascals-triangle Python3 πŸ“ Easy
119 pascals-triangle-ii Python3 πŸ“ Easy
121 best-time-to-buy-and-sell-stock Java Python3 πŸ“ Easy
125 valid-palindrome Python3 πŸ“ Easy
131 palindrome-partitioning Python3 πŸ“ Medium
136 single-number Java πŸ“ Easy
144 binary-tree-preorder-traversal Java πŸ“ Easy
145 binary-tree-postorder-traversal Java πŸ“ Easy
160 intersection-of-two-linked-lists Python3 πŸ“ Easy
169 majority-element Java πŸ“ Easy
173 binary-search-tree-iterator Golang πŸ“ Medium
202 happy-number Java πŸ“ Easy
205 isomorphic-strings Python3 πŸ“ Easy
206 reverse-linked-list Java Golang πŸ“ Easy
215 kth-largest-element-in-an-array Java πŸ“ Medium
217 contains-duplicate Java Python3 πŸ“ Easy
219 contains-duplicate-ii Java πŸ“ Easy
226 invert-binary-tree Java Python3 πŸ“ Easy
235 lowest-common-ancestor-of-a-binary-search-tree Java πŸ“ Medium
237 delete-node-in-a-linked-list Python3 πŸ“ Medium
242 valid-anagram Java Python3 πŸ“ Easy
268 missing-number Python3 πŸ“ Easy
283 move-zeroes Java πŸ“ Easy
289 game-of-life Python3 πŸ“ Medium
312 burst-balloons Python3 πŸ“ Hard
334 increasing-triplet-subsequence Python3 πŸ“ Medium
344 reverse-string Java Golang πŸ“ Easy
349 intersection-of-two-arrays Python3 πŸ“ Easy
350 intersection-of-two-arrays-ii Java Python3 πŸ“ Easy
371 sum-of-two-integers Java πŸ“ Medium
382 linked-list-random-node Golang πŸ“ Medium
383 ransom-note Java Python3 πŸ“ Easy
387 first-unique-character-in-a-string Java Python3 πŸ“ Easy
392 is-subsequence Python3 πŸ“ Easy
404 sum-of-left-leaves Java πŸ“ Easy
412 fizz-buzz Java πŸ“ Easy
414 third-maximum-number Java πŸ“ Easy
438 find-all-anagrams-in-a-string Python3 πŸ“ Medium
451 sort-characters-by-frequency Python3 πŸ“ Medium
454 4sum-ii Python3 πŸ“ Medium
455 assign-cookies Java Easy
461 hamming-distance Golang πŸ“ Easy
485 max-consecutive-ones Java πŸ“ Easy
496 next-greater-element-i Python3 πŸ“ Easy
498 diagonal-traverse Python3 πŸ“ Medium
500 keyboard-row Python3 Easy
513 find-bottom-left-tree-value Python3 Medium
530 minimum-absolute-difference-in-bst Java Easy
535 encode-and-decode-tinyurl Java πŸ“ Medium
538 convert-bst-to-greater-tree Java πŸ“ Medium
556 next-greater-element-iii Python3 πŸ“ Medium
557 reverse-words-in-a-string-iii Java πŸ“ Easy
561 array-partition Java πŸ“ Easy
575 distribute-candies Python3 πŸ“ Easy
581 shortest-unsorted-continuous-subarray Golang πŸ“ Medium
605 can-place-flowers Golang πŸ“ Easy
617 merge-two-binary-trees Java πŸ“ Easy
637 average-of-levels-in-binary-tree Java πŸ“ Easy
643 maximum-average-subarray-i Python3 πŸ“ Easy
657 robot-return-to-origin Golang πŸ“ Easy
669 trim-a-binary-search-tree Golang πŸ“ Medium
693 binary-number-with-alternating-bits Java πŸ“ Easy
728 self-dividing-numbers Golang πŸ“ Easy
742 to-lower-case Golang πŸ“ Easy
749 shortest-completing-word Python3 πŸ“ Easy
755 reach-a-number Python3 πŸ“ Medium
764 n-ary-tree-level-order-traversal Python3 πŸ“ Medium
774 maximum-depth-of-n-ary-tree Java πŸ“ Easy
777 toeplitz-matrix Java πŸ“ Easy
782 jewels-and-stones Golang πŸ“ Easy
783 search-in-a-binary-search-tree Java Golang πŸ“ Easy
784 insert-into-a-binary-search-tree Java πŸ“ Medium
789 kth-largest-element-in-a-stream Java πŸ“ Easy
792 binary-search Java πŸ“ Easy
812 rotate-string Java πŸ“ Easy
822 unique-morse-code-words Golang πŸ“ Easy
861 flipping-an-image Golang πŸ“ Easy
882 peak-index-in-a-mountain-array Golang πŸ“ Medium
890 lemonade-change Java πŸ“ Easy
896 smallest-subtree-with-all-the-deepest-nodes Golang πŸ“ Medium
908 middle-of-the-linked-list Java Python3 πŸ“ Easy
916 decoded-string-at-index Python3 πŸ“ Medium
920 uncommon-words-from-two-sentences Java πŸ“ Easy
924 fair-candy-swap Python3 πŸ“ Easy
933 increasing-order-search-tree Golang πŸ“ Easy
941 sort-array-by-parity Golang πŸ“ Easy
946 smallest-range-ii Python3 πŸ“ Medium
958 sort-array-by-parity-ii Golang πŸ“ Easy
965 unique-email-addresses Golang πŸ“ Easy
969 number-of-recent-calls Java πŸ“ Easy
974 reorder-data-in-log-files Python3 πŸ“ Medium
975 range-sum-of-bst Java πŸ“ Easy
978 valid-mountain-array Golang Python3 πŸ“ Easy
979 di-string-match Golang πŸ“ Easy
1001 n-repeated-element-in-size-2n-array Golang πŸ“ Easy
1013 fibonacci-number Python3 Golang πŸ“ Easy
1019 squares-of-a-sorted-array Golang πŸ“ Easy
1039 find-the-town-judge Golang πŸ“ Easy
1050 construct-binary-search-tree-from-preorder-traversal Java πŸ“ Medium
1054 complement-of-base-10-integer Golang πŸ“ Easy
1055 pairs-of-songs-with-total-durations-divisible-by-60 Golang πŸ“ Medium
1078 remove-outermost-parentheses Java Easy
1127 last-stone-weight Java πŸ“ Easy
1128 remove-all-adjacent-duplicates-in-string Java πŸ“ Easy
1231 replace-elements-with-greatest-element-on-right-side Python3 Easy
1254 deepest-leaves-sum Python3 πŸ“ Medium
1287 distance-between-bus-stops Python3 Easy
1293 three-consecutive-odds Golang Easy
1298 reverse-substrings-between-each-pair-of-parentheses Python3 Medium
1421 find-numbers-with-even-number-of-digits Python3 Easy
1426 find-n-unique-integers-sum-up-to-zero Python3 Easy
1447 jump-game-iv Python3 πŸ“ Hard
1459 apply-discount-every-n-orders Golang Medium
1476 count-negative-numbers-in-a-sorted-matrix Python3 Easy
1482 how-many-numbers-are-smaller-than-the-current-number Python3 Easy
1486 find-the-distance-value-between-two-arrays Python3 Easy
1490 generate-a-string-with-characters-that-have-odd-counts Python3 Easy
1497 design-a-stack-with-increment-operation Golang Medium
1510 find-lucky-integer-in-an-array Python3 πŸ“ Easy
1519 minimum-subsequence-in-non-increasing-order Python3 Easy
1528 kids-with-the-greatest-number-of-candies Python3 Golang Easy
1542 consecutive-characters Python3 πŸ“ Easy
1544 count-good-nodes-in-binary-tree Python3 πŸ“ Medium
1547 destination-city Python3 Easy
1556 make-two-arrays-equal-by-reversing-subarrays Python3 Easy
1559 cherry-pickup-ii Python3 πŸ“ Hard
1566 check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence Golang Easy
1568 pseudo-palindromic-paths-in-a-binary-tree Python3 πŸ“ Medium
1570 final-prices-with-a-special-discount-in-a-shop Golang Easy
1574 maximum-product-of-two-elements-in-an-array Python3 Easy
1580 shuffle-the-array Python3 πŸ“ Easy
1585 the-kth-factor-of-n Golang πŸ“ Medium
1603 running-sum-of-1d-array Golang πŸ“ Easy
1611 making-file-names-unique Golang Medium
1630 count-odd-numbers-in-an-interval-range Python3 πŸ“ Easy
1635 number-of-good-pairs Python3 Easy
1642 water-bottles Python3 Easy
1651 shuffle-string Python3 Easy
1666 make-the-string-great Python3 πŸ“ Easy
1683 maximum-number-of-coins-you-can-get Python3 Medium
1708 design-parking-system Golang Easy
1737 maximum-nesting-depth-of-the-parentheses Golang Easy
1741 sort-array-by-increasing-frequency Python3 Easy
1765 merge-in-between-linked-lists Golang Medium
1786 count-the-number-of-consistent-strings Python3 Easy
1791 richest-customer-wealth Golang πŸ“ Easy
1806 count-of-matches-in-tournament Python3 Easy
1833 find-the-highest-altitude Python3 Easy
1848 sum-of-unique-elements Python3 Easy
1960 check-if-the-sentence-is-pangram Python3 πŸ“ Easy
2099 number-of-strings-that-appear-as-substrings-in-word Python3 Easy
2106 find-greatest-common-divisor-of-array Python3 Easy
2231 find-first-palindromic-string-in-the-array Python3 Easy
2345 minimum-number-of-operations-to-convert-time Python3 Easy
2365 percentage-of-letter-in-string Python3 Easy
2377 check-if-number-has-equal-digit-count-and-digit-value Python3 Easy