Skip to content

SunnyAgrwl05/My_Leetcode_sol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,398 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

part3Ltcode

LeetCode Topics

Array

0001-two-sum
0040-combination-sum-ii
0042-trapping-rain-water
0048-rotate-image
0057-insert-interval
0075-sort-colors
0078-subsets
0079-word-search
0085-maximal-rectangle
0140-word-break-ii
0179-largest-number
0200-number-of-islands
0238-product-of-array-except-self
0260-single-number-iii
0287-find-the-duplicate-number
0330-patching-array
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0452-minimum-number-of-arrows-to-burst-balloons
0463-island-perimeter
0502-ipo
0506-relative-ranks
0523-continuous-subarray-sum
0525-contiguous-array
0539-minimum-time-difference
0624-maximum-distance-in-arrays
0632-smallest-range-covering-elements-from-k-lists
0645-set-mismatch
0648-replace-words
0713-subarray-product-less-than-k
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0753-open-the-lock
0802-k-th-smallest-prime-fraction
0853-most-profit-assigning-work
0859-design-circular-deque
0870-magic-squares-in-grid
0876-hand-of-straights
0887-minimum-cost-to-hire-k-workers
0890-lemonade-change
0891-score-after-flipping-matrix
0906-walking-robot-simulation
0917-boats-to-save-people
0921-spiral-matrix-iii
0943-sum-of-subarray-minimums
0948-sort-an-array
0982-minimum-increment-to-make-array-unique
0987-reveal-cards-in-increasing-order
0999-regions-cut-by-slashes
1002-maximum-width-ramp
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips
1039-find-the-town-judge
1044-find-common-characters
1137-height-checker
1138-grumpy-bookstore-owner
1196-filling-bookcase-shelves
1207-delete-nodes-and-return-forest
1217-relative-sort-array
1224-minimum-falling-path-sum-ii
1240-stone-game-ii
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1325-path-with-maximum-probability
1331-path-with-maximum-gold
1333-sort-the-jumbled-numbers
1370-count-number-of-nice-subarrays
1381-maximum-score-words-formed-by-letters
1435-xor-queries-of-a-subarray
1496-lucky-numbers-in-a-matrix
1497-design-a-stack-with-increment-operation
1511-count-number-of-teams
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1553-count-triplets-that-can-form-two-arrays-of-equal-xor
1556-make-two-arrays-equal-by-reversing-subarrays
1605-minimum-number-of-days-to-make-m-bouquets
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1620-check-if-array-pairs-are-divisible-by-k
1675-magnetic-force-between-two-balls
1691-minimum-number-of-days-to-disconnect-island
1694-make-sum-divisible-by-p
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1730-special-array-with-x-elements-greater-than-or-equal-x
1732-find-the-highest-altitude
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1802-number-of-students-unable-to-eat-lunch
1803-average-waiting-time
1833-maximum-ice-cream-bars
1848-minimum-distance-to-the-target-element
1861-rotating-the-box
1923-sentence-similarity-iii
1951-find-the-winner-of-the-circular-game
1993-sum-of-all-subset-xor-totals
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2054-the-number-of-the-smallest-unoccupied-chair
2067-maximum-number-of-points-with-cost
2103-find-all-groups-of-farmland
2132-convert-1d-array-into-2d-array
2148-minimum-number-of-moves-to-seat-everyone
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2170-count-number-of-maximum-bitwise-or-subsets
2195-time-needed-to-buy-tickets
2255-minimum-swaps-to-group-all-1s-together-ii
2306-create-binary-tree-from-descriptions
2411-spiral-matrix-iv
2454-largest-local-values-in-a-matrix
2472-build-a-matrix-with-conditions
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2524-largest-positive-integer-that-exists-with-its-negative
2527-count-subarrays-with-fixed-bounds
2553-separate-the-digits-in-an-array
2581-divide-players-into-teams-of-equal-skill
2616-maximal-score-after-applying-k-operations
2696-the-number-of-beautiful-subsets
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2846-robot-collisions
2914-find-the-safest-path-in-a-grid
3225-length-of-longest-subarray-with-at-most-k-frequency
3235-minimum-cost-to-convert-string-i
3242-count-elements-with-maximum-frequency
3249-minimum-number-of-operations-to-make-array-xor-equal-to-k
3307-find-the-maximum-sum-of-node-values
3329-find-the-length-of-the-longest-common-prefix
3351-maximize-happiness-of-selected-children
3496-minimum-number-of-seconds-to-make-mountain-height-zero
3501-delete-nodes-from-linked-list-present-in-array
3522-find-the-power-of-k-size-subarrays-i
3528-reach-end-of-array-with-max-score
3531-minimum-amount-of-damage-dealt-to-bob
3533-snake-in-matrix
3541-report-spam-message
3555-final-array-state-after-k-multiplication-operations-i
3579-maximum-possible-number-by-binary-concatenation

Stack

0042-trapping-rain-water
0085-maximal-rectangle
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0402-remove-k-digits
0678-valid-parenthesis-string
0726-number-of-atoms
0776-n-ary-tree-postorder-traversal
0943-sum-of-subarray-minimums
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1298-reverse-substrings-between-each-pair-of-parentheses
1371-minimum-remove-to-make-valid-parentheses
1497-design-a-stack-with-increment-operation
1666-make-the-string-great
1720-crawler-log-folder
1737-maximum-nesting-depth-of-the-parentheses
1756-minimum-deletions-to-make-string-balanced
1802-number-of-students-unable-to-eat-lunch
1818-maximum-score-from-removing-substrings
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2573-remove-nodes-from-linked-list
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions
2871-double-a-number-represented-as-a-linked-list

Monotonic Stack

0042-trapping-rain-water
0085-maximal-rectangle
0402-remove-k-digits
0943-sum-of-subarray-minimums
1002-maximum-width-ramp
2573-remove-nodes-from-linked-list

String

0058-length-of-last-word
0079-word-search
0131-palindrome-partitioning
0140-word-break-ii
0165-compare-version-numbers
0179-largest-number
0205-isomorphic-strings
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0344-reverse-string
0402-remove-k-digits
0409-longest-palindrome
0514-freedom-trail
0539-minimum-time-difference
0564-find-the-closest-palindrome
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0648-replace-words
0664-strange-printer
0678-valid-parenthesis-string
0726-number-of-atoms
0753-open-the-lock
0807-custom-sort-string
0920-uncommon-words-from-two-sentences
0957-minimum-add-to-make-parentheses-valid
1030-smallest-string-starting-from-leaf
1044-find-common-characters
1189-maximum-number-of-balloons
1298-reverse-substrings-between-each-pair-of-parentheses
1304-longest-happy-string
1321-get-equal-substrings-within-budget
1371-minimum-remove-to-make-valid-parentheses
1381-maximum-score-words-formed-by-letters
1473-find-the-longest-substring-containing-vowels-in-even-counts
1520-number-of-steps-to-reduce-a-number-in-binary-representation-to-one
1666-make-the-string-great
1667-find-kth-bit-in-nth-binary-string
1720-crawler-log-folder
1737-maximum-nesting-depth-of-the-parentheses
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
1923-sentence-similarity-iii
2044-number-of-wonderful-substrings
2076-sum-of-digits-of-string-after-convert
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2163-kth-distinct-string-in-an-array
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2444-longest-ideal-subsequence
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2572-append-characters-to-string-to-make-subsequence
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2800-minimum-string-length-after-removing-substrings
3195-separate-black-and-white-balls
3235-minimum-cost-to-convert-string-i
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3379-score-of-a-string
3533-snake-in-matrix
3540-hash-divided-string
3541-report-spam-message
3567-convert-date-to-binary
3570-count-of-substrings-containing-every-vowel-and-k-consonants-i
3572-count-substrings-that-can-be-rearranged-to-contain-a-string-ii

Greedy

0179-largest-number
0330-patching-array
0402-remove-k-digits
0409-longest-palindrome
0452-minimum-number-of-arrows-to-burst-balloons
0502-ipo
0624-maximum-distance-in-arrays
0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0678-valid-parenthesis-string
0853-most-profit-assigning-work
0876-hand-of-straights
0887-minimum-cost-to-hire-k-workers
0890-lemonade-change
0891-score-after-flipping-matrix
0917-boats-to-save-people
0957-minimum-add-to-make-parentheses-valid
0982-minimum-increment-to-make-array-unique
1285-balance-a-binary-search-tree
1304-longest-happy-string
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1818-maximum-score-from-removing-substrings
1833-maximum-ice-cream-bars
2095-minimum-number-of-swaps-to-make-the-string-balanced
2148-minimum-number-of-moves-to-seat-everyone
2379-maximum-total-importance-of-roads
2488-divide-intervals-into-minimum-number-of-groups
2572-append-characters-to-string-to-make-subsequence
2616-maximal-score-after-applying-k-operations
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii
3307-find-the-maximum-sum-of-node-values
3351-maximize-happiness-of-selected-children
3496-minimum-number-of-seconds-to-make-mountain-height-zero
3528-reach-end-of-array-with-max-score
3531-minimum-amount-of-damage-dealt-to-bob

Two Pointers

0042-trapping-rain-water
0075-sort-colors
0165-compare-version-numbers
0234-palindrome-linked-list
0287-find-the-duplicate-number
0344-reverse-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0567-permutation-in-string
0633-sum-of-square-numbers
0719-find-k-th-smallest-pair-distance
0802-k-th-smallest-prime-fraction
0853-most-profit-assigning-work
0917-boats-to-save-people
1615-range-sum-of-sorted-subarray-sums
1861-rotating-the-box
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2488-divide-intervals-into-minimum-number-of-groups
2524-largest-positive-integer-that-exists-with-its-negative
2572-append-characters-to-string-to-make-subsequence
2581-divide-players-into-teams-of-equal-skill
3195-separate-black-and-white-balls

Simulation

0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
0987-reveal-cards-in-increasing-order
1642-water-bottles
1667-find-kth-bit-in-nth-binary-string
1802-number-of-students-unable-to-eat-lunch
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2195-time-needed-to-buy-tickets
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2553-separate-the-digits-in-an-array
2645-pass-the-pillow
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions
3533-snake-in-matrix
3540-hash-divided-string
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i

Hash Table

0001-two-sum
0140-word-break-ii
0205-isomorphic-strings
0264-ugly-number-ii
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0409-longest-palindrome
0432-all-oone-data-structure
0523-continuous-subarray-sum
0525-contiguous-array
0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0645-set-mismatch
0648-replace-words
0726-number-of-atoms
0753-open-the-lock
0807-custom-sort-string
0870-magic-squares-in-grid
0876-hand-of-straights
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1016-subarray-sums-divisible-by-k
1039-find-the-town-judge
1044-find-common-characters
1189-maximum-number-of-balloons
1207-delete-nodes-and-return-forest
1217-relative-sort-array
1256-rank-transform-of-an-array
1370-count-number-of-nice-subarrays
1473-find-the-longest-substring-containing-vowels-in-even-counts
1553-count-triplets-that-can-form-two-arrays-of-equal-xor
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2044-number-of-wonderful-substrings
2054-the-number-of-the-smallest-unoccupied-chair
2163-kth-distinct-string-in-an-array
2306-create-binary-tree-from-descriptions
2444-longest-ideal-subsequence
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
2581-divide-players-into-teams-of-equal-skill
2696-the-number-of-beautiful-subsets
2755-extra-characters-in-a-string
3225-length-of-longest-subarray-with-at-most-k-frequency
3242-count-elements-with-maximum-frequency
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3501-delete-nodes-from-linked-list-present-in-array
3541-report-spam-message
3570-count-of-substrings-containing-every-vowel-and-k-consonants-i
3572-count-substrings-that-can-be-rearranged-to-contain-a-string-ii

Sliding Window

0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0713-subarray-product-less-than-k
1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1321-get-equal-substrings-within-budget
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
2255-minimum-swaps-to-group-all-1s-together-ii
2527-count-subarrays-with-fixed-bounds
3225-length-of-longest-subarray-with-at-most-k-frequency
3522-find-the-power-of-k-size-subarrays-i
3570-count-of-substrings-containing-every-vowel-and-k-consonants-i
3572-count-substrings-that-can-be-rearranged-to-contain-a-string-ii

Sorting

0075-sort-colors
0179-largest-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0452-minimum-number-of-arrows-to-burst-balloons
0502-ipo
0506-relative-ranks
0539-minimum-time-difference
0632-smallest-range-covering-elements-from-k-lists
0645-set-mismatch
0719-find-k-th-smallest-pair-distance
0726-number-of-atoms
0802-k-th-smallest-prime-fraction
0807-custom-sort-string
0853-most-profit-assigning-work
0876-hand-of-straights
0887-minimum-cost-to-hire-k-workers
0917-boats-to-save-people
0948-sort-an-array
0982-minimum-increment-to-make-array-unique
0987-reveal-cards-in-increasing-order
1137-height-checker
1217-relative-sort-array
1256-rank-transform-of-an-array
1333-sort-the-jumbled-numbers
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1675-magnetic-force-between-two-balls
1730-special-array-with-x-elements-greater-than-or-equal-x
1741-sort-array-by-increasing-frequency
1833-maximum-ice-cream-bars
2148-minimum-number-of-moves-to-seat-everyone
2379-maximum-total-importance-of-roads
2488-divide-intervals-into-minimum-number-of-groups
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
2581-divide-players-into-teams-of-equal-skill
2696-the-number-of-beautiful-subsets
2846-robot-collisions
3276-minimum-number-of-pushes-to-type-word-ii
3307-find-the-maximum-sum-of-node-values
3351-maximize-happiness-of-selected-children
3531-minimum-amount-of-damage-dealt-to-bob

Prefix Sum

0238-product-of-array-except-self
0523-continuous-subarray-sum
0525-contiguous-array
0713-subarray-product-less-than-k
0731-my-calendar-ii
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips
1240-stone-game-ii
1321-get-equal-substrings-within-budget
1370-count-number-of-nice-subarrays
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1553-count-triplets-that-can-form-two-arrays-of-equal-xor
1694-make-sum-divisible-by-p
1732-find-the-highest-altitude
2006-find-the-student-that-will-replace-the-chalk
2044-number-of-wonderful-substrings
2488-divide-intervals-into-minimum-number-of-groups

Counting

0920-uncommon-words-from-two-sentences
0982-minimum-increment-to-make-array-unique
1189-maximum-number-of-balloons
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2494-sum-of-prefix-scores-of-strings
3242-count-elements-with-maximum-frequency
3276-minimum-number-of-pushes-to-type-word-ii

Design

0432-all-oone-data-structure
0729-my-calendar-i
0731-my-calendar-ii
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
1497-design-a-stack-with-increment-operation

Linked List

0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0432-all-oone-data-structure
0725-split-linked-list-in-parts
0859-design-circular-deque
1484-linked-list-in-binary-tree
1765-merge-in-between-linked-lists
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2573-remove-nodes-from-linked-list
2871-double-a-number-represented-as-a-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Doubly-Linked List

0432-all-oone-data-structure

Queue

0859-design-circular-deque
0987-reveal-cards-in-increasing-order
1037-minimum-number-of-k-consecutive-bit-flips
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1802-number-of-students-unable-to-eat-lunch
1951-find-the-winner-of-the-circular-game
2195-time-needed-to-buy-tickets
2527-count-subarrays-with-fixed-bounds

Binary Search

0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0633-sum-of-square-numbers
0713-subarray-product-less-than-k
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0802-k-th-smallest-prime-fraction
0853-most-profit-assigning-work
1321-get-equal-substrings-within-budget
1605-minimum-number-of-days-to-make-m-bouquets
1615-range-sum-of-sorted-subarray-sums
1675-magnetic-force-between-two-balls
1730-special-array-with-x-elements-greater-than-or-equal-x
2006-find-the-student-that-will-replace-the-chalk
2914-find-the-safest-path-in-a-grid
3496-minimum-number-of-seconds-to-make-mountain-height-zero

Segment Tree

0729-my-calendar-i
0731-my-calendar-ii
1511-count-number-of-teams

Ordered Set

0729-my-calendar-i
0731-my-calendar-ii
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Trie

0140-word-break-ii
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
0648-replace-words
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3329-find-the-length-of-the-longest-common-prefix

Dynamic Programming

0042-trapping-rain-water
0085-maximal-rectangle
0131-palindrome-partitioning
0140-word-break-ii
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0514-freedom-trail
0552-student-attendance-record-ii
0650-2-keys-keyboard
0664-strange-printer
0678-valid-parenthesis-string
0863-sum-of-distances-in-tree
0943-sum-of-subarray-minimums
1196-filling-bookcase-shelves
1224-minimum-falling-path-sum-ii
1236-n-th-tribonacci-number
1240-stone-game-ii
1381-maximum-score-words-formed-by-letters
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost
2444-longest-ideal-subsequence
2696-the-number-of-beautiful-subsets
2755-extra-characters-in-a-string
3307-find-the-maximum-sum-of-node-values
3753-total-waviness-of-numbers-in-range-ii

Depth-First Search

0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0200-number-of-islands
0310-minimum-height-trees
0386-lexicographical-numbers
0404-sum-of-left-leaves
0463-island-perimeter
0514-freedom-trail
0623-add-one-row-to-tree
0776-n-ary-tree-postorder-traversal
0863-sum-of-distances-in-tree
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1021-distribute-coins-in-binary-tree
1030-smallest-string-starting-from-leaf
1114-binary-search-tree-to-greater-sum-tree
1207-delete-nodes-and-return-forest
1285-balance-a-binary-search-tree
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2103-find-all-groups-of-farmland
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2416-evaluate-boolean-binary-tree

Rolling Hash

0214-shortest-palindrome

String Matching

0214-shortest-palindrome

Hash Function

0214-shortest-palindrome

Math

0048-rotate-image
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0273-integer-to-english-words
0523-continuous-subarray-sum
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0633-sum-of-square-numbers
0650-2-keys-keyboard
0670-maximum-swap
0870-magic-squares-in-grid
1236-n-th-tribonacci-number
1240-stone-game-ii
1344-angle-between-hands-of-a-clock
1370-count-number-of-nice-subarrays
1553-count-triplets-that-can-form-two-arrays-of-equal-xor
1642-water-bottles
1951-find-the-winner-of-the-circular-game
1993-sum-of-all-subset-xor-totals
2155-find-missing-observations
2645-pass-the-pillow
2696-the-number-of-beautiful-subsets
2871-double-a-number-represented-as-a-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3496-minimum-number-of-seconds-to-make-mountain-height-zero
3555-final-array-state-after-k-multiplication-operations-i
3567-convert-date-to-binary
3568-find-the-key-of-the-numbers
3600-find-the-k-th-character-in-string-game-i
3753-total-waviness-of-numbers-in-range-ii

Recursion

0234-palindrome-linked-list
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game
2573-remove-nodes-from-linked-list
3600-find-the-k-th-character-in-string-game-i

Memoization

0140-word-break-ii
0241-different-ways-to-add-parentheses
1236-n-th-tribonacci-number

Bit Manipulation

0078-subsets
0191-number-of-1-bits
0260-single-number-iii
0287-find-the-duplicate-number
0476-number-complement
0645-set-mismatch
0891-score-after-flipping-matrix
1037-minimum-number-of-k-consecutive-bit-flips
1381-maximum-score-words-formed-by-letters
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1520-number-of-steps-to-reduce-a-number-in-binary-representation-to-one
1553-count-triplets-that-can-form-two-arrays-of-equal-xor
1786-count-the-number-of-consistent-strings
1993-sum-of-all-subset-xor-totals
2044-number-of-wonderful-substrings
2170-count-number-of-maximum-bitwise-or-subsets
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and
3249-minimum-number-of-operations-to-make-array-xor-equal-to-k
3307-find-the-maximum-sum-of-node-values
3579-maximum-possible-number-by-binary-concatenation
3600-find-the-k-th-character-in-string-game-i

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and

Number Theory

2903-insert-greatest-common-divisors-in-linked-list

Matrix

0048-rotate-image
0079-word-search
0085-maximal-rectangle
0200-number-of-islands
0463-island-perimeter
0870-magic-squares-in-grid
0891-score-after-flipping-matrix
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1224-minimum-falling-path-sum-ii
1331-path-with-maximum-gold
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
1861-rotating-the-box
2035-count-sub-islands
2067-maximum-number-of-points-with-cost
2103-find-all-groups-of-farmland
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv
2454-largest-local-values-in-a-matrix
2472-build-a-matrix-with-conditions
2914-find-the-safest-path-in-a-grid

Tree

0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0404-sum-of-left-leaves
0623-add-one-row-to-tree
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
0863-sum-of-distances-in-tree
1021-distribute-coins-in-binary-tree
1030-smallest-string-starting-from-leaf
1114-binary-search-tree-to-greater-sum-tree
1207-delete-nodes-and-return-forest
1285-balance-a-binary-search-tree
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions
2416-evaluate-boolean-binary-tree
3307-find-the-maximum-sum-of-node-values

Binary Tree

0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0404-sum-of-left-leaves
0623-add-one-row-to-tree
0789-kth-largest-element-in-a-stream
1021-distribute-coins-in-binary-tree
1030-smallest-string-starting-from-leaf
1114-binary-search-tree-to-greater-sum-tree
1207-delete-nodes-and-return-forest
1285-balance-a-binary-search-tree
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions
2416-evaluate-boolean-binary-tree

Graph

0310-minimum-height-trees
0863-sum-of-distances-in-tree
0984-most-stones-removed-with-same-row-or-column
1039-find-the-town-judge
1325-path-with-maximum-probability
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
1916-find-center-of-star-graph
2171-second-minimum-time-to-reach-destination
2379-maximum-total-importance-of-roads
2472-build-a-matrix-with-conditions
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

Heap (Priority Queue)

0264-ugly-number-ii
0502-ipo
0506-relative-ranks
0632-smallest-range-covering-elements-from-k-lists
0789-kth-largest-element-in-a-stream
0802-k-th-smallest-prime-fraction
0887-minimum-cost-to-hire-k-workers
0948-sort-an-array
1304-longest-happy-string
1325-path-with-maximum-probability
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
2054-the-number-of-the-smallest-unoccupied-chair
2379-maximum-total-importance-of-roads
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2803-modify-graph-edge-weights
3496-minimum-number-of-seconds-to-make-mountain-height-zero
3555-final-array-state-after-k-multiplication-operations-i

Shortest Path

1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

Union Find

0200-number-of-islands
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2035-count-sub-islands
2914-find-the-safest-path-in-a-grid

Breadth-First Search

0200-number-of-islands
0310-minimum-height-trees
0404-sum-of-left-leaves
0463-island-perimeter
0514-freedom-trail
0623-add-one-row-to-tree
0753-open-the-lock
0999-regions-cut-by-slashes
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2103-find-all-groups-of-farmland
2171-second-minimum-time-to-reach-destination
2914-find-the-safest-path-in-a-grid

Game Theory

1240-stone-game-ii

Backtracking

0040-combination-sum-ii
0078-subsets
0079-word-search
0131-palindrome-partitioning
0140-word-break-ii
1030-smallest-string-starting-from-leaf
1331-path-with-maximum-gold
1381-maximum-score-words-formed-by-letters
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2696-the-number-of-beautiful-subsets

Binary Search Tree

0789-kth-largest-element-in-a-stream
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Data Stream

0789-kth-largest-element-in-a-stream

Strongly Connected Component

1691-minimum-number-of-days-to-disconnect-island

Binary Indexed Tree

1511-count-number-of-teams

Divide and Conquer

0191-number-of-1-bits
0948-sort-an-array
1285-balance-a-binary-search-tree

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array
1137-height-checker
1217-relative-sort-array
1833-maximum-ice-cream-bars
2148-minimum-number-of-moves-to-seat-everyone

Topological Sort

0310-minimum-height-trees
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2472-build-a-matrix-with-conditions

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
2527-count-subarrays-with-fixed-bounds

Bitmask

1381-maximum-score-words-formed-by-letters

Combinatorics

1993-sum-of-all-subset-xor-totals
2696-the-number-of-beautiful-subsets

Enumeration

1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
3579-maximum-possible-number-by-binary-concatenation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages