File tree
736 files changed
+3199
-117
lines changed- problems
- 01-matrix
- 1-bit-and-2-bit-characters
- 132-pattern
- 2-keys-keyboard
- 24-game
- 3sum-closest
- 3sum-with-multiplicity
- 3sum
- 4sum-ii
- 4sum
- accounts-merge
- add-and-search-word-data-structure-design
- add-binary
- add-digits
- add-one-row-to-tree
- add-strings
- add-two-numbers-ii
- add-two-numbers
- additive-number
- advantage-shuffle
- all-nodes-distance-k-in-binary-tree
- all-oone-data-structure
- all-possible-full-binary-trees
- ambiguous-coordinates
- arithmetic-slices-ii-subsequence
- arithmetic-slices
- arranging-coins
- array-nesting
- array-of-doubled-pairs
- array-partition-i
- assign-cookies
- asteroid-collision
- average-of-levels-in-binary-tree
- backspace-string-compare
- bag-of-tokens
- balanced-binary-tree
- baseball-game
- basic-calculator-ii
- basic-calculator-iv
- basic-calculator
- beautiful-arrangement-ii
- beautiful-arrangement
- beautiful-array
- best-time-to-buy-and-sell-stock-iii
- best-time-to-buy-and-sell-stock-ii
- best-time-to-buy-and-sell-stock-iv
- best-time-to-buy-and-sell-stock-with-cooldown
- best-time-to-buy-and-sell-stock-with-transaction-fee
- best-time-to-buy-and-sell-stock
- binary-gap
- binary-number-with-alternating-bits
- binary-search-tree-iterator
- binary-search
- binary-subarrays-with-sum
- binary-tree-inorder-traversal
- binary-tree-level-order-traversal-ii
- binary-tree-level-order-traversal
- binary-tree-maximum-path-sum
- binary-tree-paths
- binary-tree-postorder-traversal
- binary-tree-preorder-traversal
- binary-tree-pruning
- binary-tree-right-side-view
- binary-tree-tilt
- binary-tree-zigzag-level-order-traversal
- binary-watch
- bitwise-and-of-numbers-range
- bitwise-ors-of-subarrays
- boats-to-save-people
- brick-wall
- bricks-falling-when-hit
- buddy-strings
- bulb-switcher-ii
- bulb-switcher
- bulls-and-cows
- burst-balloons
- bus-routes
- can-i-win
- can-place-flowers
- candy
- car-fleet
- cat-and-mouse
- chalkboard-xor-game
- cheapest-flights-within-k-stops
- check-completeness-of-a-binary-tree
- cherry-pickup
- climbing-stairs
- clone-graph
- coin-change
- combination-sum-iii
- combination-sum-ii
- combination-sum-iv
- combination-sum
- combinations
- compare-version-numbers
- complete-binary-tree-inserter
- complex-number-multiplication
- concatenated-words
- consecutive-numbers-sum
- construct-binary-tree-from-inorder-and-postorder-traversal
- construct-binary-tree-from-preorder-and-inorder-traversal
- construct-binary-tree-from-preorder-and-postorder-traversal
- construct-string-from-binary-tree
- contain-virus
- container-with-most-water
- contains-duplicate-iii
- contains-duplicate-ii
- contains-duplicate
- contiguous-array
- continuous-subarray-sum
- convert-a-number-to-hexadecimal
- convert-bst-to-greater-tree
- convert-sorted-array-to-binary-search-tree
- convert-sorted-list-to-binary-search-tree
- copy-list-with-random-pointer
- count-and-say
- count-binary-substrings
- count-complete-tree-nodes
- count-different-palindromic-subsequences
- count-numbers-with-unique-digits
- count-of-range-sum
- count-of-smaller-numbers-after-self
- count-primes
- count-the-repetitions
- counting-bits
- couples-holding-hands
- course-schedule-iii
- course-schedule-ii
- course-schedule
- cracking-the-safe
- create-maximum-number
- custom-sort-string
- cut-off-trees-for-golf-event
- daily-temperatures
- data-stream-as-disjoint-intervals
- decode-string
- decode-ways-ii
- decode-ways
- decoded-string-at-index
- degree-of-an-array
- delete-and-earn
- delete-columns-to-make-sorted-iii
- delete-columns-to-make-sorted-ii
- delete-columns-to-make-sorted
- delete-node-in-a-bst
- delete-node-in-a-linked-list
- delete-operation-for-two-strings
- design-circular-deque
- design-circular-queue
- design-hashmap
- design-hashset
- design-linked-list
- design-twitter
- detect-capital
- di-string-match
- diameter-of-binary-tree
- different-ways-to-add-parentheses
- distinct-subsequences-ii
- distinct-subsequences
- distribute-candies
- divide-two-integers
- domino-and-tromino-tiling
- dota2-senate
- dungeon-game
- edit-distance
- employee-importance
- encode-and-decode-tinyurl
- erect-the-fence
- escape-the-ghosts
- evaluate-division
- evaluate-reverse-polish-notation
- exam-room
- excel-sheet-column-number
- excel-sheet-column-title
- exclusive-time-of-functions
- expression-add-operators
- expressive-words
- factorial-trailing-zeroes
- fair-candy-swap
- falling-squares
- find-all-anagrams-in-a-string
- find-all-duplicates-in-an-array
- find-all-numbers-disappeared-in-an-array
- find-and-replace-in-string
- find-and-replace-pattern
- find-bottom-left-tree-value
- find-duplicate-file-in-system
- find-duplicate-subtrees
- find-eventual-safe-states
- find-first-and-last-position-of-element-in-sorted-array
- find-k-closest-elements
- find-k-pairs-with-smallest-sums
- find-k-th-smallest-pair-distance
- find-largest-value-in-each-tree-row
- find-median-from-data-stream
- find-minimum-in-rotated-sorted-array-ii
- find-minimum-in-rotated-sorted-array
- find-mode-in-binary-search-tree
- find-peak-element
- find-pivot-index
- find-right-interval
- find-smallest-letter-greater-than-target
- find-the-closest-palindrome
- find-the-difference
- find-the-duplicate-number
- find-the-shortest-superstring
- first-bad-version
- first-missing-positive
- first-unique-character-in-a-string
- flatten-a-multilevel-doubly-linked-list
- flatten-binary-tree-to-linked-list
- flatten-nested-list-iterator
- flip-equivalent-binary-trees
- flip-string-to-monotone-increasing
- flipping-an-image
- flood-fill
- fraction-addition-and-subtraction
- fraction-to-recurring-decimal
- freedom-trail
- friend-circles
- friends-of-appropriate-ages
- frog-jump
- fruit-into-baskets
- game-of-life
- gas-station
- generate-parentheses
- generate-random-point-in-a-circle
- global-and-local-inversions
- goat-latin
- gray-code
- group-anagrams
- groups-of-special-equivalent-strings
- guess-number-higher-or-lower-ii
- guess-number-higher-or-lower
- guess-the-word
- h-index-ii
- h-index
- hamming-distance
- hand-of-straights
- happy-number
- heaters
- house-robber-iii
- house-robber-ii
- house-robber
- image-overlap
- image-smoother
- implement-magic-dictionary
- implement-queue-using-stacks
- implement-rand10-using-rand7
- implement-stack-using-queues
- implement-strstr
- implement-trie-prefix-tree
- increasing-order-search-tree
- increasing-subsequences
- insert-delete-getrandom-o1-duplicates-allowed
- insert-delete-getrandom-o1
- insert-interval
- insert-into-a-binary-search-tree
- insertion-sort-list
- integer-break
- integer-replacement
- integer-to-english-words
- integer-to-roman
- interleaving-string
- intersection-of-two-arrays-ii
- intersection-of-two-arrays
- intersection-of-two-linked-lists
- invert-binary-tree
- ipo
- is-graph-bipartite
- is-subsequence
- island-perimeter
- isomorphic-strings
- jewels-and-stones
- jump-game-ii
- jump-game
- k-diff-pairs-in-an-array
- k-inverse-pairs-array
- k-similar-strings
- k-th-smallest-prime-fraction
- k-th-symbol-in-grammar
- keyboard-row
- keys-and-rooms
- knight-dialer
- knight-probability-in-chessboard
- koko-eating-bananas
- kth-largest-element-in-a-stream
- kth-largest-element-in-an-array
- kth-smallest-element-in-a-bst
- kth-smallest-element-in-a-sorted-matrix
- kth-smallest-number-in-multiplication-table
- largest-component-size-by-common-factor
- largest-divisible-subset
- largest-number-at-least-twice-of-others
- largest-number
- largest-plus-sign
- largest-rectangle-in-histogram
- largest-sum-of-averages
- largest-time-for-given-digits
- largest-triangle-area
- leaf-similar-trees
- least-operators-to-express-number
- lemonade-change
- length-of-last-word
- length-of-longest-fibonacci-subsequence
- letter-case-permutation
- letter-combinations-of-a-phone-number
- lfu-cache
- linked-list-components
- linked-list-cycle-ii
- linked-list-cycle
- linked-list-random-node
- long-pressed-name
- longest-common-prefix
- longest-consecutive-sequence
- longest-continuous-increasing-subsequence
- longest-harmonious-subsequence
- longest-increasing-path-in-a-matrix
- longest-increasing-subsequence
- longest-mountain-in-array
- longest-palindrome
- longest-palindromic-subsequence
- longest-palindromic-substring
- longest-substring-without-repeating-characters
- longest-uncommon-subsequence-ii
- longest-uncommon-subsequence-i
- longest-univalue-path
- longest-valid-parentheses
- longest-word-in-dictionary-through-deleting
- longest-word-in-dictionary
- loud-and-rich
- lowest-common-ancestor-of-a-binary-search-tree
- lowest-common-ancestor-of-a-binary-tree
- lru-cache
- magic-squares-in-grid
- majority-element-ii
- majority-element
- making-a-large-island
- map-sum-pairs
- masking-personal-information
- matchsticks-to-square
- max-area-of-island
- max-chunks-to-make-sorted-ii
- max-chunks-to-make-sorted
- max-consecutive-ones
- max-points-on-a-line
- max-sum-of-rectangle-no-larger-than-k
- maximal-rectangle
- maximal-square
- maximize-distance-to-closest-person
- maximum-average-subarray-i
- maximum-binary-tree
- maximum-depth-of-binary-tree
- maximum-depth-of-n-ary-tree
- maximum-frequency-stack
- maximum-gap
- maximum-length-of-pair-chain
- maximum-length-of-repeated-subarray
- maximum-product-of-three-numbers
- maximum-product-of-word-lengths
- maximum-product-subarray
- maximum-subarray
- maximum-sum-circular-subarray
- maximum-sum-of-3-non-overlapping-subarrays
- maximum-swap
- maximum-width-of-binary-tree
- maximum-width-ramp
- maximum-xor-of-two-numbers-in-an-array
- median-of-two-sorted-arrays
- merge-intervals
- merge-k-sorted-lists
- merge-sorted-array
- merge-two-binary-trees
- merge-two-sorted-lists
- middle-of-the-linked-list
- min-cost-climbing-stairs
- min-stack
- minesweeper
- mini-parser
- minimize-malware-spread-ii
- minimize-malware-spread
- minimum-absolute-difference-in-bst
- minimum-add-to-make-parentheses-valid
- minimum-area-rectangle-ii
- minimum-area-rectangle
- minimum-ascii-delete-sum-for-two-strings
- minimum-cost-to-hire-k-workers
- minimum-depth-of-binary-tree
- minimum-distance-between-bst-nodes
- minimum-falling-path-sum
- minimum-height-trees
- minimum-increment-to-make-array-unique
- minimum-index-sum-of-two-lists
- minimum-moves-to-equal-array-elements-ii
- minimum-moves-to-equal-array-elements
- minimum-number-of-arrows-to-burst-balloons
- minimum-number-of-refueling-stops
- minimum-path-sum
- minimum-size-subarray-sum
- minimum-swaps-to-make-sequences-increasing
- minimum-time-difference
- minimum-window-substring
- mirror-reflection
- missing-number
- monotone-increasing-digits
- monotonic-array
- most-common-word
- most-frequent-subtree-sum
- most-profit-assigning-work
- most-stones-removed-with-same-row-or-column
- move-zeroes
- multiply-strings
- my-calendar-iii
- my-calendar-ii
- my-calendar-i
- n-ary-tree-level-order-traversal
- n-ary-tree-postorder-traversal
- n-ary-tree-preorder-traversal
- n-queens-ii
- n-queens
- n-repeated-element-in-size-2n-array
- network-delay-time
- new-21-game
- next-greater-element-iii
- next-greater-element-ii
- next-greater-element-i
- next-permutation
- nim-game
- non-decreasing-array
- non-negative-integers-without-consecutive-ones
- non-overlapping-intervals
- nth-digit
- nth-magical-number
- number-complement
- number-of-1-bits
- number-of-atoms
- number-of-boomerangs
- number-of-digit-one
- number-of-islands
- number-of-longest-increasing-subsequence
- number-of-matching-subsequences
- number-of-music-playlists
- number-of-recent-calls
- number-of-segments-in-a-string
- number-of-subarrays-with-bounded-maximum
- numbers-at-most-n-given-digit-set
- odd-even-linked-list
- ones-and-zeroes
- online-election
- online-stock-span
- open-the-lock
- optimal-division
- orderly-queue
- out-of-boundary-paths
- pacific-atlantic-water-flow
- palindrome-linked-list
- palindrome-number
- palindrome-pairs
- palindrome-partitioning-ii
- palindrome-partitioning
- palindromic-substrings
- parse-lisp-expression
- partition-array-into-disjoint-intervals
- partition-equal-subset-sum
- partition-labels
- partition-list
- partition-to-k-equal-sum-subsets
- pascals-triangle-ii
- pascals-triangle
- patching-array
- path-sum-iii
- path-sum-ii
- path-sum
- peak-index-in-a-mountain-array
- peeking-iterator
- perfect-number
- perfect-squares
- permutation-in-string
- permutation-sequence
- permutations-ii
- permutations
- plus-one
- populating-next-right-pointers-in-each-node-ii
- populating-next-right-pointers-in-each-node
- positions-of-large-groups
- possible-bipartition
- power-of-four
- power-of-three
- power-of-two
- powx-n
- predict-the-winner
- prefix-and-suffix-search
- preimage-size-of-factorial-zeroes-function
- prime-number-of-set-bits-in-binary-representation
- prime-palindrome
- print-binary-tree
- prison-cells-after-n-days
- product-of-array-except-self
- profitable-schemes
- projection-area-of-3d-shapes
- push-dominoes
- pyramid-transition-matrix
- queue-reconstruction-by-height
- rabbits-in-forest
- race-car
- random-flip-matrix
- random-pick-index
- random-pick-with-blacklist
- random-pick-with-weight
- random-point-in-non-overlapping-rectangles
- range-addition-ii
- range-module
- range-sum-of-bst
- range-sum-query-2d-immutable
- range-sum-query-immutable
- range-sum-query-mutable
- ransom-note
- reach-a-number
- reachable-nodes-in-subdivided-graph
- reaching-points
- reconstruct-itinerary
- reconstruct-original-digits-from-english
- recover-binary-search-tree
- rectangle-area-ii
- rectangle-area
- rectangle-overlap
- redundant-connection-ii
- redundant-connection
- regions-cut-by-slashes
- regular-expression-matching
- remove-boxes
- remove-comments
- remove-duplicate-letters
- remove-duplicates-from-sorted-array-ii
- remove-duplicates-from-sorted-array
- remove-duplicates-from-sorted-list-ii
- remove-duplicates-from-sorted-list
- remove-element
- remove-invalid-parentheses
- remove-k-digits
- remove-linked-list-elements
- remove-nth-node-from-end-of-list
- reorder-list
- reorder-log-files
- reordered-power-of-2
- reorganize-string
- repeated-dna-sequences
- repeated-string-match
- repeated-substring-pattern
- replace-words
- reshape-the-matrix
- restore-ip-addresses
- reveal-cards-in-increasing-order
- reverse-bits
- reverse-integer
- reverse-linked-list-ii
- reverse-linked-list
- reverse-nodes-in-k-group
- reverse-only-letters
- reverse-pairs
- reverse-string-ii
- reverse-string
- reverse-vowels-of-a-string
- reverse-words-in-a-string-iii
- reverse-words-in-a-string
- rle-iterator
- robot-return-to-origin
- roman-to-integer
- rotate-array
- rotate-function
- rotate-image
- rotate-list
- rotated-digits
- russian-doll-envelopes
- same-tree
- score-after-flipping-matrix
- score-of-parentheses
- scramble-string
- search-a-2d-matrix-ii
- search-a-2d-matrix
- search-in-a-binary-search-tree
- search-in-rotated-sorted-array-ii
- search-in-rotated-sorted-array
- search-insert-position
- second-minimum-node-in-a-binary-tree
- self-crossing
- self-dividing-numbers
- serialize-and-deserialize-binary-tree
- serialize-and-deserialize-bst
- set-intersection-size-at-least-two
- set-matrix-zeroes
- set-mismatch
- shifting-letters
- shopping-offers
- shortest-bridge
- shortest-completing-word
- shortest-palindrome
- shortest-path-to-get-all-keys
- shortest-path-visiting-all-nodes
- shortest-subarray-with-sum-at-least-k
- shortest-unsorted-continuous-subarray
- shuffle-an-array
- similar-string-groups
- simplify-path
- single-number-iii
- single-number-ii
- single-number
- sliding-puzzle
- sliding-window-maximum
- smallest-good-base
- smallest-range-ii
- smallest-range-i
- smallest-range
- smallest-subtree-with-all-the-deepest-nodes
- snakes-and-ladders
- solve-the-equation
- sort-array-by-parity-ii
- sort-array-by-parity
- sort-characters-by-frequency
- sort-colors
- sort-list
- soup-servings
- special-binary-string
- spiral-matrix-iii
- spiral-matrix-ii
- spiral-matrix
- split-array-into-consecutive-subsequences
- split-array-into-fibonacci-sequence
- split-array-largest-sum
- split-array-with-same-average
- split-linked-list-in-parts
- sqrtx
- stamping-the-sequence
- stickers-to-spell-word
- stone-game
- strange-printer
- string-compression
- string-to-integer-atoi
- student-attendance-record-ii
- student-attendance-record-i
- subarray-product-less-than-k
- subarray-sum-equals-k
- subdomain-visit-count
- subsets-ii
- subsets
- substring-with-concatenation-of-all-words
- subtree-of-another-tree
- sudoku-solver
- sum-of-distances-in-tree
- sum-of-left-leaves
- sum-of-square-numbers
- sum-of-subarray-minimums
- sum-of-subsequence-widths
- sum-of-two-integers
- sum-root-to-leaf-numbers
- summary-ranges
- super-egg-drop
- super-palindromes
- super-pow
- super-ugly-number
- super-washing-machines
- surface-area-of-3d-shapes
- surrounded-regions
- swap-adjacent-in-lr-string
- swap-nodes-in-pairs
- swim-in-rising-water
- symmetric-tree
- tag-validator
- tallest-billboard
- target-sum
- task-scheduler
- teemo-attacking
- text-justification
- the-skyline-problem
- third-maximum-number
- three-equal-parts
- to-lower-case
- toeplitz-matrix
- top-k-frequent-elements
- top-k-frequent-words
- total-hamming-distance
- transform-to-chessboard
- transpose-matrix
- trapping-rain-water-ii
- trapping-rain-water
- triangle
- trim-a-binary-search-tree
- two-sum-ii-input-array-is-sorted
- two-sum-iv-input-is-a-bst
- two-sum
- ugly-number-ii
- ugly-number
- uncommon-words-from-two-sentences
- unique-binary-search-trees-ii
- unique-binary-search-trees
- unique-email-addresses
- unique-letter-string
- unique-morse-code-words
- unique-paths-ii
- unique-paths
- unique-substrings-in-wraparound-string
- utf-8-validation
- valid-anagram
- valid-mountain-array
- valid-number
- valid-palindrome-ii
- valid-palindrome
- valid-parentheses
- valid-parenthesis-string
- valid-perfect-square
- valid-permutations-for-di-sequence
- valid-square
- valid-sudoku
- valid-tic-tac-toe-state
- valid-triangle-number
- validate-binary-search-tree
- validate-ip-address
- validate-stack-sequences
- verify-preorder-serialization-of-a-binary-tree
- verifying-an-alien-dictionary
- walking-robot-simulation
- water-and-jug-problem
- wiggle-sort-ii
- wiggle-subsequence
- wildcard-matching
- word-break-ii
- word-break
- word-ladder-ii
- word-ladder
- word-pattern
- word-search-ii
- word-search
- word-subsets
- x-of-a-kind-in-a-deck-of-cards
- zigzag-conversion
- zuma-game
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
736 files changed
+3199
-117
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + |
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
| 40 | + | |
| 41 | + | |
39 | 42 |
| |
40 | 43 |
| |
| 44 | + | |
| 45 | + | |
| 46 | + |
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + |
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 |
| |
42 | 45 |
| |
| 46 | + | |
| 47 | + | |
| 48 | + |
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + |
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + |
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 |
| |
30 | 33 |
| |
31 | 34 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
32 | 35 |
| |
33 | 36 |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 |
| |
31 | 34 |
| |
32 | 35 |
| |
|
0 commit comments