An open API service indexing awesome lists of open source software.

https://github.com/trilliwon/leetcode

🚧 [WIP] LeetCode solutions, mostly in Python
https://github.com/trilliwon/leetcode

interview problem-solving python

Last synced: 3 months ago
JSON representation

🚧 [WIP] LeetCode solutions, mostly in Python

Awesome Lists containing this project

README

          

# My codes for LeetCode
- [EASY](#easy)
- [MEDIUM](#medium)
- [HARD](#hard)

---

## EASY
- [ADD-DIGITS](https://leetcode.com/problems/add-digits) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/add-digits.py)]**
- [ADD-TO-ARRAY-FORM-OF-INTEGER](https://leetcode.com/problems/add-to-array-form-of-integer) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/add-to-array-form-of-integer.py)]**
- [ARRANGING-COINS](https://leetcode.com/problems/arranging-coins) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/arranging-coins.py)]**
- [ASSIGN-COOKIES](https://leetcode.com/problems/assign-cookies) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/assign-cookies.py)]**
- [AVERAGE-OF-LEVELS-IN-BINARY-TREE](https://leetcode.com/problems/average-of-levels-in-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/average-of-levels-in-binary-tree.py)]**
- [BACKSPACE-STRING-COMPARE](https://leetcode.com/problems/backspace-string-compare) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/backspace-string-compare.py)]**
- [BALANCED-BINARY-TREE](https://leetcode.com/problems/balanced-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/balanced-binary-tree.py)]**
- [BASE-7](https://leetcode.com/problems/base-7) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/base-7.py)]**
- [BINARY-GAP](https://leetcode.com/problems/binary-gap) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/binary-gap.py)]**
- [BINARY-SEARCH](https://leetcode.com/problems/binary-search) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/binary-search.py)]**
- [BINARY-TREE-LEVEL-ORDER-TRAVERSAL-II](https://leetcode.com/problems/binary-tree-level-order-traversal-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/binary-tree-level-order-traversal-ii.py)]**
- [BINARY-TREE-PATHS](https://leetcode.com/problems/binary-tree-paths) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/binary-tree-paths.py)]**
- [BINARY-WATCH](https://leetcode.com/problems/binary-watch) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/binary-watch.py)]**
- [BUDDY-STRINGS](https://leetcode.com/problems/buddy-strings) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/buddy-strings.py)]**
- [BUDDY-STRINGS](https://leetcode.com/problems/buddy-strings) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/buddy-strings.swift)]**
- [CAN-PLACE-FLOWERS](https://leetcode.com/problems/can-place-flowers) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/can-place-flowers.py)]**
- [CONSTRUCT-QUAD-TREE](https://leetcode.com/problems/construct-quad-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/construct-quad-tree.py)]**
- [CONSTRUCT-STRING-FROM-BINARY-TREE](https://leetcode.com/problems/construct-string-from-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/construct-string-from-binary-tree.py)]**
- [CONVERT-A-NUMBER-TO-HEXADECIMAL](https://leetcode.com/problems/convert-a-number-to-hexadecimal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/convert-a-number-to-hexadecimal.py)]**
- [CONVERT-BST-TO-GREATER-TREE](https://leetcode.com/problems/convert-bst-to-greater-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/convert-bst-to-greater-tree.py)]**
- [CONVERT-SORTED-ARRAY-TO-BINARY-SEARCH-TREE](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/convert-sorted-array-to-binary-search-tree.py)]**
- [CONVERT-SORTED-LIST-TO-BINARY-SEARCH-TREE](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/convert-sorted-list-to-binary-search-tree.py)]**
- [COUNT-BINARY-SUBSTRINGS](https://leetcode.com/problems/count-binary-substrings) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/count-binary-substrings.py)]**
- [COUNT-PRIMES](https://leetcode.com/problems/count-primes) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/count-primes.py)]**
- [COUSINS-IN-BINARY-TREE](https://leetcode.com/problems/cousins-in-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/cousins-in-binary-tree.py)]**
- [DEGREE-OF-AN-ARRAY](https://leetcode.com/problems/degree-of-an-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/degree-of-an-array.py)]**
- [DESIGN-LINKED-LIST](https://leetcode.com/problems/design-linked-list) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/design-linked-list.py)]**
- [DIAMETER-OF-BINARY-TREE](https://leetcode.com/problems/diameter-of-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/diameter-of-binary-tree.py)]**
- [DISTRIBUTE-CANDIES](https://leetcode.com/problems/distribute-candies) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/distribute-candies.py)]**
- [DIVISOR-GAME](https://leetcode.com/problems/divisor-game) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/divisor-game.py)]**
- [EMPLOYEE-IMPORTANCE](https://leetcode.com/problems/employee-importance) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/employee-importance.py)]**
- [EXCEL-SHEET-COLUMN-NUMBER](https://leetcode.com/problems/excel-sheet-column-number) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/excel-sheet-column-number.py)]**
- [EXCEL-SHEET-COLUMN-TITLE](https://leetcode.com/problems/excel-sheet-column-title) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/excel-sheet-column-title.py)]**
- [FACTORIAL-TRAILING-ZEROES](https://leetcode.com/problems/factorial-trailing-zeroes) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/factorial-trailing-zeroes.py)]**
- [FIND-ALL-ANAGRAMS-IN-A-STRING](https://leetcode.com/problems/find-all-anagrams-in-a-string) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/easy/find-all-anagrams-in-a-string.cpp)]**
- [FIND-ALL-ANAGRAMS-IN-A-STRING](https://leetcode.com/problems/find-all-anagrams-in-a-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/find-all-anagrams-in-a-string.py)]**
- [FIND-ALL-NUMBERS-DISAPPEARED-IN-AN-ARRAY](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/find-all-numbers-disappeared-in-an-array.py)]**
- [FIND-MODE-IN-BINARY-SEARCH-TREE](https://leetcode.com/problems/find-mode-in-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/find-mode-in-binary-search-tree.py)]**
- [FIND-PIVOT-INDEX](https://leetcode.com/problems/find-pivot-index) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/find-pivot-index.py)]**
- [FIND-THE-DIFFERENCE](https://leetcode.com/problems/find-the-difference) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/find-the-difference.py)]**
- [FIRST-BAD-VERSION](https://leetcode.com/problems/first-bad-version) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/first-bad-version.py)]**
- [FIRST-UNIQUE-CHARACTER-IN-A-STRING](https://leetcode.com/problems/first-unique-character-in-a-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/first-unique-character-in-a-string.py)]**
- [FIZZ-BUZZ](https://leetcode.com/problems/fizz-buzz) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/fizz-buzz.py)]**
- [GOAT-LATIN](https://leetcode.com/problems/goat-latin) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/goat-latin.py)]**
- [GROUPS-OF-SPECIAL-EQUIVALENT-STRINGS](https://leetcode.com/problems/groups-of-special-equivalent-strings) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/groups-of-special-equivalent-strings.py)]**
- [GUESS-NUMBER-HIGHER-OR-LOWER](https://leetcode.com/problems/guess-number-higher-or-lower) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/guess-number-higher-or-lower.py)]**
- [HAMMING-DISTANCE](https://leetcode.com/problems/hamming-distance) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/hamming-distance.py)]**
- [HAPPY-NUMBER](https://leetcode.com/problems/happy-number) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/happy-number.py)]**
- [HEATERS](https://leetcode.com/problems/heaters) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/heaters.py)]**
- [HOUSE-ROBBER](https://leetcode.com/problems/house-robber) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/house-robber.py)]**
- [IMAGE-SMOOTHER](https://leetcode.com/problems/image-smoother) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/image-smoother.py)]**
- [IMPLEMENT-QUEUE-USING-STACKS](https://leetcode.com/problems/implement-queue-using-stacks) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/implement-queue-using-stacks.py)]**
- [IMPLEMENT-STACK-USING-QUEUES](https://leetcode.com/problems/implement-stack-using-queues) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/implement-stack-using-queues.py)]**
- [INCREASING-ORDER-SEARCH-TREE](https://leetcode.com/problems/increasing-order-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/increasing-order-search-tree.py)]**
- [INVERT-BINARY-TREE](https://leetcode.com/problems/invert-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/invert-binary-tree.py)]**
- [IS-SUBSEQUENCE](https://leetcode.com/problems/is-subsequence) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/is-subsequence.py)]**
- [ISLAND-PERIMETER](https://leetcode.com/problems/island-perimeter) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/island-perimeter.py)]**
- [ISOMORPHIC-STRINGS](https://leetcode.com/problems/isomorphic-strings) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/isomorphic-strings.py)]**
- [K-DIFF-PAIRS-IN-AN-ARRAY](https://leetcode.com/problems/k-diff-pairs-in-an-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/k-diff-pairs-in-an-array.py)]**
- [KEYBOARD-ROW](https://leetcode.com/problems/keyboard-row) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/keyboard-row.py)]**
- [LARGEST-NUMBER-AT-LEAST-TWICE-OF-OTHERS](https://leetcode.com/problems/largest-number-at-least-twice-of-others) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/largest-number-at-least-twice-of-others.py)]**
- [LEAF-SIMILAR-TREES](https://leetcode.com/problems/leaf-similar-trees) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/leaf-similar-trees.py)]**
- [LEMONADE-CHANGE](https://leetcode.com/problems/lemonade-change) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/lemonade-change.py)]**
- [LETTER-CASE-PERMUTATION](https://leetcode.com/problems/letter-case-permutation) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/letter-case-permutation.py)]**
- [LICENSE-KEY-FORMATTING](https://leetcode.com/problems/license-key-formatting) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/license-key-formatting.py)]**
- [LONGEST-COMMON-PREFIX](https://leetcode.com/problems/longest-common-prefix) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/longest-common-prefix.py)]**
- [LONGEST-CONTINUOUS-INCREASING-SUBSEQUENCE](https://leetcode.com/problems/longest-continuous-increasing-subsequence) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/longest-continuous-increasing-subsequence.py)]**
- [LONGEST-HARMONIOUS-SUBSEQUENCE](https://leetcode.com/problems/longest-harmonious-subsequence) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/longest-harmonious-subsequence.swift)]**
- [LONGEST-PALINDROME](https://leetcode.com/problems/longest-palindrome) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/longest-palindrome.py)]**
- [LONGEST-WORD-IN-DICTIONARY](https://leetcode.com/problems/longest-word-in-dictionary) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/longest-word-in-dictionary.py)]**
- [LOWEST-COMMON-ANCESTOR-OF-A-BINARY-SEARCH-TREE](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/lowest-common-ancestor-of-a-binary-search-tree.py)]**
- [MAGIC-SQUARES-IN-GRID](https://leetcode.com/problems/magic-squares-in-grid) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/magic-squares-in-grid.py)]**
- [MAX-AREA-OF-ISLAND](https://leetcode.com/problems/max-area-of-island) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/max-area-of-island.py)]**
- [MAXIMIZE-DISTANCE-TO-CLOSEST-PERSON](https://leetcode.com/problems/maximize-distance-to-closest-person) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/maximize-distance-to-closest-person.py)]**
- [MAXIMUM-AVERAGE-SUBARRAY-I](https://leetcode.com/problems/maximum-average-subarray-i) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/maximum-average-subarray-i.py)]**
- [MAXIMUM-DEPTH-OF-N-ARY-TREE](https://leetcode.com/problems/maximum-depth-of-n-ary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/maximum-depth-of-n-ary-tree.py)]**
- [MAXIMUM-SUBARRAY](https://leetcode.com/problems/maximum-subarray) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/maximum-subarray.py)]**
- [MERGE-TWO-BINARY-TREES](https://leetcode.com/problems/merge-two-binary-trees) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/merge-two-binary-trees.py)]**
- [MIDDLE-OF-THE-LINKED-LIST](https://leetcode.com/problems/middle-of-the-linked-list) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/middle-of-the-linked-list.py)]**
- [MIN-COST-CLIMBING-STAIRS](https://leetcode.com/problems/min-cost-climbing-stairs) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/min-cost-climbing-stairs.py)]**
- [MINIMUM-ABSOLUTE-DIFFERENCE-IN-BST](https://leetcode.com/problems/minimum-absolute-difference-in-bst) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/minimum-absolute-difference-in-bst.py)]**
- [MINIMUM-DEPTH-OF-BINARY-TREE](https://leetcode.com/problems/minimum-depth-of-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/minimum-depth-of-binary-tree.py)]**
- [MINIMUM-DISTANCE-BETWEEN-BST-NODES](https://leetcode.com/problems/minimum-distance-between-bst-nodes) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/minimum-distance-between-bst-nodes.py)]**
- [MINIMUM-INDEX-SUM-OF-TWO-LISTS](https://leetcode.com/problems/minimum-index-sum-of-two-lists) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/minimum-index-sum-of-two-lists.py)]**
- [MINIMUM-MOVES-TO-EQUAL-ARRAY-ELEMENTS](https://leetcode.com/problems/minimum-moves-to-equal-array-elements) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/easy/minimum-moves-to-equal-array-elements.cpp)]**
- [N-ARY-TREE-LEVEL-ORDER-TRAVERSAL](https://leetcode.com/problems/n-ary-tree-level-order-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/n-ary-tree-level-order-traversal.py)]**
- [N-ARY-TREE-POSTORDER-TRAVERSAL](https://leetcode.com/problems/n-ary-tree-postorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/n-ary-tree-postorder-traversal.py)]**
- [N-ARY-TREE-PREORDER-TRAVERSAL](https://leetcode.com/problems/n-ary-tree-preorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/n-ary-tree-preorder-traversal.py)]**
- [NEXT-GREATER-ELEMENT-I](https://leetcode.com/problems/next-greater-element-i) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/next-greater-element-i.py)]**
- [NIM-GAME](https://leetcode.com/problems/nim-game) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/nim-game.py)]**
- [NON-DECREASING-ARRAY](https://leetcode.com/problems/non-decreasing-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/non-decreasing-array.py)]**
- [NTH-DIGIT](https://leetcode.com/problems/nth-digit) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/nth-digit.py)]**
- [NUMBER-OF-1-BITS](https://leetcode.com/problems/number-of-1-bits) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/number-of-1-bits.py)]**
- [NUMBER-OF-BOOMERANGS](https://leetcode.com/problems/number-of-boomerangs) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/number-of-boomerangs.py)]**
- [NUMBER-OF-LINES-TO-WRITE-STRING](https://leetcode.com/problems/number-of-lines-to-write-string) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/number-of-lines-to-write-string.swift)]**
- [NUMBER-OF-SEGMENTS-IN-A-STRING](https://leetcode.com/problems/number-of-segments-in-a-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/number-of-segments-in-a-string.py)]**
- [PALINDROME-NUMBER](https://leetcode.com/problems/palindrome-number) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/palindrome-number.swift)]**
- [PATH-SUM-III](https://leetcode.com/problems/path-sum-iii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/path-sum-iii.py)]**
- [PEAK-INDEX-IN-A-MOUNTAIN-ARRAY](https://leetcode.com/problems/peak-index-in-a-mountain-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/peak-index-in-a-mountain-array.py)]**
- [POSITIONS-OF-LARGE-GROUPS](https://leetcode.com/problems/positions-of-large-groups) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/positions-of-large-groups.py)]**
- [POWER-OF-FOUR](https://leetcode.com/problems/power-of-four) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/power-of-four.py)]**
- [POWER-OF-THREE](https://leetcode.com/problems/power-of-three) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/power-of-three.py)]**
- [POWER-OF-TWO](https://leetcode.com/problems/power-of-two) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/power-of-two.py)]**
- [RANGE-SUM-QUERY-IMMUTABLE](https://leetcode.com/problems/range-sum-query-immutable) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/range-sum-query-immutable.py)]**
- [RANSOM-NOTE](https://leetcode.com/problems/ransom-note) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/ransom-note.py)]**
- [RECTANGLE-OVERLAP](https://leetcode.com/problems/rectangle-overlap) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/rectangle-overlap.py)]**
- [RELATIVE-RANKS](https://leetcode.com/problems/relative-ranks) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/relative-ranks.py)]**
- [REORDER-LOG-FILES](https://leetcode.com/problems/reorder-log-files) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/reorder-log-files.py)]**
- [RESHAPE-THE-MATRIX](https://leetcode.com/problems/reshape-the-matrix) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/reshape-the-matrix.py)]**
- [REVERSE-INTEGER](https://leetcode.com/problems/reverse-integer) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/reverse-integer.swift)]**
- [REVERSE-ONLY-LETTERS](https://leetcode.com/problems/reverse-only-letters) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/reverse-only-letters.swift)]**
- [REVERSE-STRING-II](https://leetcode.com/problems/reverse-string-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/reverse-string-ii.py)]**
- [REVERSE-VOWELS-OF-A-STRING](https://leetcode.com/problems/reverse-vowels-of-a-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/reverse-vowels-of-a-string.py)]**
- [ROMAN-TO-INTEGER](https://leetcode.com/problems/roman-to-integer) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/roman-to-integer.py)]**
- [ROTATE-ARRAY](https://leetcode.com/problems/rotate-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/rotate-array.py)]**
- [ROTATE-STRING](https://leetcode.com/problems/rotate-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/rotate-string.py)]**
- [ROTATED-DIGITS](https://leetcode.com/problems/rotated-digits) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/rotated-digits.py)]**
- [ROTTING-ORANGES](https://leetcode.com/problems/rotting-oranges) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/rotting-oranges.py)]**
- [SEARCH-IN-A-BINARY-SEARCH-TREE](https://leetcode.com/problems/search-in-a-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/search-in-a-binary-search-tree.py)]**
- [SECOND-MINIMUM-NODE-IN-A-BINARY-TREE](https://leetcode.com/problems/second-minimum-node-in-a-binary-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/second-minimum-node-in-a-binary-tree.py)]**
- [SELF-DIVIDING-NUMBERS](https://leetcode.com/problems/self-dividing-numbers) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/self-dividing-numbers.py)]**
- [SHORTEST-DISTANCE-TO-A-CHARACTER](https://leetcode.com/problems/shortest-distance-to-a-character) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/shortest-distance-to-a-character.py)]**
- [SMALLEST-RANGE-I](https://leetcode.com/problems/smallest-range-i) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/smallest-range-i.swift)]**
- [SORT-ARRAY-BY-PARITY-II](https://leetcode.com/problems/sort-array-by-parity-ii) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/sort-array-by-parity-ii.swift)]**
- [SORT-ARRAY-BY-PARITY](https://leetcode.com/problems/sort-array-by-parity) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/sort-array-by-parity.swift)]**
- [SUBTREE-OF-ANOTHER-TREE](https://leetcode.com/problems/subtree-of-another-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/subtree-of-another-tree.py)]**
- [SUM-OF-LEFT-LEAVES](https://leetcode.com/problems/sum-of-left-leaves) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/sum-of-left-leaves.py)]**
- [SUM-OF-SQUARE-NUMBERS](https://leetcode.com/problems/sum-of-square-numbers) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/sum-of-square-numbers.py)]**
- [SYMMETRIC-TREE](https://leetcode.com/problems/symmetric-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/symmetric-tree.py)]**
- [TOEPLITZ-MATRIX](https://leetcode.com/problems/toeplitz-matrix) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/toeplitz-matrix.py)]**
- [TRANSPOSE-MATRIX](https://leetcode.com/problems/transpose-matrix) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/transpose-matrix.py)]**
- [TRIM-A-BINARY-SEARCH-TREE](https://leetcode.com/problems/trim-a-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/trim-a-binary-search-tree.py)]**
- [TWO-CITY-SCHEDULING](https://leetcode.com/problems/two-city-scheduling) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/two-city-scheduling.py)]**
- [TWO-SUM-IV-INPUT-IS-A-BST](https://leetcode.com/problems/two-sum-iv-input-is-a-bst) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/two-sum-iv-input-is-a-bst.py)]**
- [UNCOMMON-WORDS-FROM-TWO-SENTENCES](https://leetcode.com/problems/uncommon-words-from-two-sentences) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/uncommon-words-from-two-sentences.py)]**
- [UNIQUE-EMAIL-ADDRESSES](https://leetcode.com/problems/unique-email-addresses) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/unique-email-addresses.py)]**
- [UNIQUE-MORSE-CODE-WORDS](https://leetcode.com/problems/unique-morse-code-words) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/unique-morse-code-words.swift)]**
- [VALID-PERFECT-SQUARE](https://leetcode.com/problems/valid-perfect-square) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/valid-perfect-square.py)]**
- [WORD-PATTERN](https://leetcode.com/problems/word-pattern) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/easy/word-pattern.py)]**
- [X-OF-A-KIND-IN-A-DECK-OF-CARDS](https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/easy/x-of-a-kind-in-a-deck-of-cards.swift)]**

## MEDIUM
- [ADD-TWO-NUMBERS-II](https://leetcode.com/problems/add-two-numbers-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/add-two-numbers-ii.py)]**
- [ADD-TWO-NUMBERS](https://leetcode.com/problems/add-two-numbers) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/medium/add-two-numbers.cpp)]**
- [ADD-TWO-NUMBERS](https://leetcode.com/problems/add-two-numbers) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/add-two-numbers.py)]**
- [AMBIGUOUS-COORDINATES](https://leetcode.com/problems/ambiguous-coordinates) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/ambiguous-coordinates.py)]**
- [ARITHMETIC-SLICES](https://leetcode.com/problems/arithmetic-slices) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/arithmetic-slices.py)]**
- [BINARY-TREE-INORDER-TRAVERSAL](https://leetcode.com/problems/binary-tree-inorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/binary-tree-inorder-traversal.py)]**
- [BINARY-TREE-PREORDER-TRAVERSAL](https://leetcode.com/problems/binary-tree-preorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/binary-tree-preorder-traversal.py)]**
- [BRICK-WALL](https://leetcode.com/problems/brick-wall) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/medium/brick-wall.cpp)]**
- [COIN-CHANGE-2](https://leetcode.com/problems/coin-change-2) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/coin-change-2.py)]**
- [COIN-CHANGE](https://leetcode.com/problems/coin-change) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/coin-change.py)]**
- [COMBINATION-SUM-IV](https://leetcode.com/problems/combination-sum-iv) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/combination-sum-iv.py)]**
- [CONSTRUCT-BINARY-SEARCH-TREE-FROM-PREORDER-TRAVERSAL](https://leetcode.com/problems/construct-binary-search-tree-from-preorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/construct-binary-search-tree-from-preorder-traversal.py)]**
- [CONTAINER-WITH-MOST-WATER](https://leetcode.com/problems/container-with-most-water) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/container-with-most-water.swift)]**
- [CONTINUOUS-SUBARRAY-SUM](https://leetcode.com/problems/continuous-subarray-sum) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/continuous-subarray-sum.py)]**
- [CONVERT-SORTED-LIST-TO-BINARY-SEARCH-TREE](https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/convert-sorted-list-to-binary-search-tree.py)]**
- [COUNT-NUMBERS-WITH-UNIQUE-DIGITS](https://leetcode.com/problems/count-numbers-with-unique-digits) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/count-numbers-with-unique-digits.py)]**
- [EXPRESSIVE-WORDS](https://leetcode.com/problems/expressive-words) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/expressive-words.py)]**
- [FIND-ALL-DUPLICATES-IN-AN-ARRAY](https://leetcode.com/problems/find-all-duplicates-in-an-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/find-all-duplicates-in-an-array.py)]**
- [FRUIT-INTO-BASKETS](https://leetcode.com/problems/fruit-into-baskets) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/fruit-into-baskets.swift)]**
- [GLOBAL-AND-LOCAL-INVERSIONS](https://leetcode.com/problems/global-and-local-inversions) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/medium/global-and-local-inversions.cpp)]**
- [HOUSE-ROBBER-II](https://leetcode.com/problems/house-robber-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/house-robber-ii.py)]**
- [INTEGER-BREAK](https://leetcode.com/problems/integer-break) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/integer-break.py)]**
- [KTH-LARGEST-ELEMENT-IN-AN-ARRAY](https://leetcode.com/problems/kth-largest-element-in-an-array) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/kth-largest-element-in-an-array.py)]**
- [LARGEST-DIVISIBLE-SUBSET](https://leetcode.com/problems/largest-divisible-subset) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/largest-divisible-subset.py)]**
- [LARGEST-TRIANGLE-AREA](https://leetcode.com/problems/largest-triangle-area) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/largest-triangle-area.py)]**
- [LINKED-LIST-COMPONENTS](https://leetcode.com/problems/linked-list-components) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/linked-list-components.py)]**
- [LONGEST-COMMON-SUBSEQUENCE](https://leetcode.com/problems/longest-common-subsequence) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/longest-common-subsequence.py)]**
- [LONGEST-INCREASING-SUBSEQUENCE](https://leetcode.com/problems/longest-increasing-subsequence) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/longest-increasing-subsequence.py)]**
- [LONGEST-SUBSTRING-WITHOUT-REPEATING-CHARACTERS](https://leetcode.com/problems/longest-substring-without-repeating-characters) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/longest-substring-without-repeating-characters.swift)]**
- [MAX-INCREASE-TO-KEEP-CITY-SKYLINE](https://leetcode.com/problems/max-increase-to-keep-city-skyline) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/max-increase-to-keep-city-skyline.py)]**
- [MAX-INCREASE-TO-KEEP-CITY-SKYLINE](https://leetcode.com/problems/max-increase-to-keep-city-skyline) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/max-increase-to-keep-city-skyline.swift)]**
- [MAXIMAL-SQUARE_V1](https://leetcode.com/problems/maximal-square_v1) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/maximal-square_v1.py)]**
- [MAXIMAL-SQUARE_V2](https://leetcode.com/problems/maximal-square_v2) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/maximal-square_v2.py)]**
- [MAXIMUM-LENGTH-OF-PAIR-CHAIN](https://leetcode.com/problems/maximum-length-of-pair-chain) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/maximum-length-of-pair-chain.py)]**
- [MAXIMUM-PRODUCT-SUBARRAY](https://leetcode.com/problems/maximum-product-subarray) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/maximum-product-subarray.py)]**
- [MINIMUM-ADD-TO-MAKE-PARENTHESES-VALID](https://leetcode.com/problems/minimum-add-to-make-parentheses-valid) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/minimum-add-to-make-parentheses-valid.swift)]**
- [MINIMUM-PATH-SUM](https://leetcode.com/problems/minimum-path-sum) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/minimum-path-sum.swift)]**
- [MOST-COMMON-WORD](https://leetcode.com/problems/most-common-word) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/most-common-word.py)]**
- [NUMBER-OF-LINES-TO-WRITE-STRING](https://leetcode.com/problems/number-of-lines-to-write-string) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/number-of-lines-to-write-string.py)]**
- [ONES-AND-ZEROES](https://leetcode.com/problems/ones-and-zeroes) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/ones-and-zeroes.py)]**
- [PARTITION-ARRAY-INTO-DISJOINT-INTERVALS](https://leetcode.com/problems/partition-array-into-disjoint-intervals) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/partition-array-into-disjoint-intervals.swift)]**
- [PARTITION-EQUAL-SUBSET-SUM](https://leetcode.com/problems/partition-equal-subset-sum) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/partition-equal-subset-sum.py)]**
- [PATH-SUM-II](https://leetcode.com/problems/path-sum-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/path-sum-ii.py)]**
- [PERFECT-SQUARES](https://leetcode.com/problems/perfect-squares) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/perfect-squares.py)]**
- [PERMUTATIONS-II](https://leetcode.com/problems/permutations-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/permutations-ii.py)]**
- [PERMUTATIONS](https://leetcode.com/problems/permutations) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/permutations.py)]**
- [PREDICT-THE-WINNER](https://leetcode.com/problems/predict-the-winner) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/predict-the-winner.py)]**
- [RACE-CAR](https://leetcode.com/problems/race-car) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/race-car.py)]**
- [RANGE-SUM-QUERY-2D-IMMUTABLE](https://leetcode.com/problems/range-sum-query-2d-immutable) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/range-sum-query-2d-immutable.py)]**
- [REMOVE-NTH-NODE-FROM-END-OF-LIST](https://leetcode.com/problems/remove-nth-node-from-end-of-list) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/remove-nth-node-from-end-of-list.py)]**
- [REORDER-LIST](https://leetcode.com/problems/reorder-list) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/reorder-list.py)]**
- [REVERSE-WORDS-IN-A-STRING-III](https://leetcode.com/problems/reverse-words-in-a-string-iii) **[[.cpp](https://github.com/trilliwon/LeetCode/blob/master/medium/reverse-words-in-a-string-iii.cpp)]**
- [ROTATE-IMAGE](https://leetcode.com/problems/rotate-image) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/rotate-image.py)]**
- [ROTATE-LIST](https://leetcode.com/problems/rotate-list) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/rotate-list.py)]**
- [SCORE-OF-PARENTHESES](https://leetcode.com/problems/score-of-parentheses) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/score-of-parentheses.swift)]**
- [SET-MATRIX-ZEROES](https://leetcode.com/problems/set-matrix-zeroes) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/set-matrix-zeroes.py)]**
- [SNAKES-AND-LADDERS](https://leetcode.com/problems/snakes-and-ladders) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/snakes-and-ladders.swift)]**
- [SUBDOMAIN-VISIT-COUNT](https://leetcode.com/problems/subdomain-visit-count) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/subdomain-visit-count.py)]**
- [SUBSETS-II](https://leetcode.com/problems/subsets-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/subsets-ii.py)]**
- [SUBSETS](https://leetcode.com/problems/subsets) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/subsets.py)]**
- [TARGET-SUM](https://leetcode.com/problems/target-sum) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/target-sum.py)]**
- [TRIANGLE](https://leetcode.com/problems/triangle) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/triangle.py)]**
- [UGLY-NUMBER-II](https://leetcode.com/problems/ugly-number-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/ugly-number-ii.py)]**
- [UNIQUE-BINARY-SEARCH-TREES-II](https://leetcode.com/problems/unique-binary-search-trees-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/unique-binary-search-trees-ii.py)]**
- [UNIQUE-BINARY-SEARCH-TREES](https://leetcode.com/problems/unique-binary-search-trees) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/unique-binary-search-trees.py)]**
- [UNIQUE-MORSE-CODE-WORDS](https://leetcode.com/problems/unique-morse-code-words) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/unique-morse-code-words.py)]**
- [UNIQUE-PATHS-II](https://leetcode.com/problems/unique-paths-ii) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/unique-paths-ii.swift)]**
- [UNIQUE-PATHS](https://leetcode.com/problems/unique-paths) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/unique-paths.swift)]**
- [VALIDATE-BINARY-SEARCH-TREE](https://leetcode.com/problems/validate-binary-search-tree) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/validate-binary-search-tree.py)]**
- [WIGGLE-SUBSEQUENCE](https://leetcode.com/problems/wiggle-subsequence) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/wiggle-subsequence.py)]**
- [WORD-BREAK](https://leetcode.com/problems/word-break) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/medium/word-break.py)]**
- [WORD-SUBSETS](https://leetcode.com/problems/word-subsets) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/word-subsets.swift)]**
- [ZIGZAG-CONVERSION](https://leetcode.com/problems/zigzag-conversion) **[[.swift](https://github.com/trilliwon/LeetCode/blob/master/medium/zigzag-conversion.swift)]**

## HARD
- [BINARY-TREE-POSTORDER-TRAVERSAL](https://leetcode.com/problems/binary-tree-postorder-traversal) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/hard/binary-tree-postorder-traversal.py)]**
- [N-QUEENS-II](https://leetcode.com/problems/n-queens-ii) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/hard/n-queens-ii.py)]**
- [N-QUEENS](https://leetcode.com/problems/n-queens) **[[.py](https://github.com/trilliwon/LeetCode/blob/master/hard/n-queens.py)]**