Skip to content

Shubham-Raj-25/LeetCode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

Created using LeetHub

Array

0075-sort-colors
0330-patching-array
0502-ipo
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1137-height-checker
1138-grumpy-bookstore-owner
1217-relative-sort-array
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone
3231-minimum-number-of-coins-to-be-added

Sorting

0075-sort-colors
0502-ipo
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone
3231-minimum-number-of-coins-to-be-added

Counting Sort

0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array

Hash Table

1217-relative-sort-array
1370-count-number-of-nice-subarrays

Two Pointers

0075-sort-colors
0633-sum-of-square-numbers
0853-most-profit-assigning-work

Greedy

0330-patching-array
0502-ipo
0853-most-profit-assigning-work
0982-minimum-increment-to-make-array-unique
1285-balance-a-binary-search-tree
2148-minimum-number-of-moves-to-seat-everyone
3231-minimum-number-of-coins-to-be-added

Heap (Priority Queue)

0502-ipo
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Math

0633-sum-of-square-numbers
0668-kth-smallest-number-in-multiplication-table
1370-count-number-of-nice-subarrays

Binary Search

0633-sum-of-square-numbers
0668-kth-smallest-number-in-multiplication-table
0853-most-profit-assigning-work
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls

String

0488-zuma-game

Dynamic Programming

0488-zuma-game

Stack

0488-zuma-game

Breadth-First Search

0488-zuma-game

Memoization

0488-zuma-game

Sliding Window

1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Ordered Set

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Search Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Divide and Conquer

1285-balance-a-binary-search-tree

Graph

1916-find-center-of-star-graph

LeetCode Topics

Depth-First Search

0133-clone-graph
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0236-lowest-common-ancestor-of-a-binary-tree
0365-water-and-jug-problem
0386-lexicographical-numbers
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0690-employee-importance
0770-couples-holding-hands
0776-n-ary-tree-postorder-traversal
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0854-making-a-large-island
0881-loud-and-rich
0964-minimize-malware-spread-ii
0988-flip-equivalent-binary-trees
0999-regions-cut-by-slashes
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1442-number-of-operations-to-make-network-connected
1558-course-schedule-iv
1653-number-of-good-leaf-nodes-pairs
1663-detect-cycles-in-2d-grid
2035-count-sub-islands
2201-valid-arrangement-of-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2246-maximum-employees-to-be-invited-to-a-meeting
2400-minimum-score-after-removals-on-a-tree
2493-reverse-odd-levels-of-binary-tree
2564-most-profitable-path-in-a-tree
2677-cousins-in-binary-tree-ii
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees
3509-k-th-largest-perfect-subtree-size-in-binary-tree
3603-check-if-dfs-strings-are-palindromes
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Breadth-First Search

0127-word-ladder
0133-clone-graph
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0365-water-and-jug-problem
0407-trapping-rain-water-ii
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0690-employee-importance
0770-couples-holding-hands
0787-sliding-puzzle
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0854-making-a-large-island
0964-minimize-malware-spread-ii
0999-regions-cut-by-slashes
1036-rotting-oranges
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1442-number-of-operations-to-make-network-connected
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1663-detect-cycles-in-2d-grid
1876-map-of-highest-peak
2035-count-sub-islands
2171-second-minimum-time-to-reach-destination
2375-minimum-obstacle-removal-to-reach-corner
2493-reverse-odd-levels-of-binary-tree
2564-most-profitable-path-in-a-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2588-maximum-number-of-points-from-grid-queries
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
2711-minimum-time-to-visit-a-cell-in-a-grid
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0684-redundant-connection
0770-couples-holding-hands
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0881-loud-and-rich
0964-minimize-malware-spread-ii
1325-path-with-maximum-probability
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1442-number-of-operations-to-make-network-connected
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
1706-min-cost-to-connect-all-points
1986-largest-color-value-in-a-directed-graph
2090-number-of-ways-to-arrive-at-destination
2171-second-minimum-time-to-reach-destination
2201-valid-arrangement-of-pairs
2220-find-all-possible-recipes-from-given-supplies
2246-maximum-employees-to-be-invited-to-a-meeting
2375-minimum-obstacle-removal-to-reach-corner
2472-build-a-matrix-with-conditions
2564-most-profitable-path-in-a-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2711-minimum-time-to-visit-a-cell-in-a-grid
2793-count-the-number-of-complete-components
2803-modify-graph-edge-weights
3189-find-champion-ii
3235-minimum-cost-to-convert-string-i
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
0881-loud-and-rich
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1558-course-schedule-iv
1986-largest-color-value-in-a-directed-graph
2090-number-of-ways-to-arrive-at-destination
2220-find-all-possible-recipes-from-given-supplies
2246-maximum-employees-to-be-invited-to-a-meeting
2472-build-a-matrix-with-conditions

Union Find

0200-number-of-islands
0684-redundant-connection
0770-couples-holding-hands
0854-making-a-large-island
0964-minimize-malware-spread-ii
0989-largest-component-size-by-common-factor
0999-regions-cut-by-slashes
1058-lexicographically-smallest-equivalent-string
1396-count-servers-that-communicate
1442-number-of-operations-to-make-network-connected
1663-detect-cycles-in-2d-grid
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
1706-min-cost-to-connect-all-points
2035-count-sub-islands
2583-divide-nodes-into-the-maximum-number-of-groups
2588-maximum-number-of-points-from-grid-queries
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
3219-make-lexicographically-smallest-array-by-swapping-elements

Array

0033-search-in-rotated-sorted-array
0040-combination-sum-ii
0056-merge-intervals
0075-sort-colors
0079-word-search
0118-pascals-triangle
0120-triangle
0137-single-number-ii
0179-largest-number
0188-best-time-to-buy-and-sell-stock-iv
0200-number-of-islands
0212-word-search-ii
0240-search-a-2d-matrix-ii
0300-longest-increasing-subsequence
0312-burst-balloons
0336-palindrome-pairs
0368-largest-divisible-subset
0407-trapping-rain-water-ii
0494-target-sum
0498-diagonal-traverse
0539-minimum-time-difference
0540-single-element-in-a-sorted-array
0611-valid-triangle-number
0624-maximum-distance-in-arrays
0679-24-game
0689-maximum-sum-of-3-non-overlapping-subarrays
0690-employee-importance
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0854-making-a-large-island
0870-magic-squares-in-grid
0881-loud-and-rich
0890-lemonade-change
0892-shortest-subarray-with-sum-at-least-k
0905-length-of-longest-fibonacci-subsequence
0906-walking-robot-simulation
0921-spiral-matrix-iii
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
0948-sort-an-array
0952-word-subsets
0964-minimize-malware-spread-ii
0989-largest-component-size-by-common-factor
0999-regions-cut-by-slashes
1002-maximum-width-ramp
1006-vowel-spellchecker
1017-odd-even-jump
1036-rotting-oranges
1063-best-sightseeing-pair
1147-flip-columns-for-maximum-number-of-equal-rows
1240-stone-game-ii
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
1335-maximum-candies-allocated-to-k-children
1364-tuple-with-same-product
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1477-product-of-the-last-k-numbers
1478-maximum-number-of-events-that-can-be-attended
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1496-lucky-numbers-in-a-matrix
1511-count-number-of-teams
1524-string-matching-in-an-array
1586-longest-subarray-of-1s-after-deleting-one-element
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1620-check-if-array-pairs-are-divisible-by-k
1631-number-of-sub-arrays-with-odd-sum
1663-detect-cycles-in-2d-grid
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1694-make-sum-divisible-by-p
1706-min-cost-to-connect-all-points
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1755-defuse-the-bomb
1813-maximum-erasure-value
1834-minimum-number-of-people-to-teach
1849-maximum-absolute-sum-of-any-subarray
1851-maximum-number-of-events-that-can-be-attended-ii
1876-map-of-highest-peak
1878-check-if-array-is-sorted-and-rotated
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1917-maximum-average-pass-ratio
1923-sentence-similarity-iii
1951-find-the-winner-of-the-circular-game
1962-single-threaded-cpu
1993-sum-of-all-subset-xor-totals
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2048-build-array-from-permutation
2054-the-number-of-the-smallest-unoccupied-chair
2067-maximum-number-of-points-with-cost
2107-find-unique-binary-string
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2145-grid-game
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2164-two-best-non-overlapping-events
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2249-count-the-hidden-sequences
2255-minimum-swaps-to-group-all-1s-together-ii
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2280-count-good-triplets-in-an-array
2306-create-binary-tree-from-descriptions
2308-divide-array-into-equal-pairs
2316-count-hills-and-valleys-in-an-array
2356-largest-combination-with-bitwise-and-greater-than-zero
2375-minimum-obstacle-removal-to-reach-corner
2394-count-subarrays-with-score-less-than-k
2400-minimum-score-after-removals-on-a-tree
2411-spiral-matrix-iv
2432-number-of-zero-filled-subarrays
2448-count-number-of-bad-pairs
2465-shifting-letters-ii
2472-build-a-matrix-with-conditions
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2497-maximum-matching-of-players-with-trainers
2498-smallest-subarrays-with-maximum-bitwise-or
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2527-count-subarrays-with-fixed-bounds
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2552-maximum-sum-of-distinct-subarrays-with-length-k
2554-minimum-total-distance-traveled
2564-most-profitable-path-in-a-tree
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2588-maximum-number-of-points-from-grid-queries
2616-maximal-score-after-applying-k-operations
2618-maximize-the-minimum-powered-city
2626-count-the-number-of-good-subarrays
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
2681-put-marbles-in-bags
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2691-count-vowel-strings-in-ranges
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2711-minimum-time-to-visit-a-cell-in-a-grid
2716-prime-subtraction-operation
2755-extra-characters-in-a-string
2764-maximum-number-of-fish-in-a-grid
2792-neighboring-bitwise-xor
2794-maximum-number-of-moves-in-a-grid
2818-maximum-strictly-increasing-cells-in-a-matrix
2846-robot-collisions
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
2915-count-of-interesting-subarrays
3152-maximum-value-of-an-ordered-triplet-ii
3181-find-building-where-alice-and-bob-can-meet
3194-find-words-containing-character
3213-count-subarrays-where-max-element-appears-at-least-k-times
3219-make-lexicographically-smallest-array-by-swapping-elements
3235-minimum-cost-to-convert-string-i
3242-count-elements-with-maximum-frequency
3291-find-if-array-can-be-sorted
3329-find-the-length-of-the-longest-common-prefix
3381-maximum-subarray-sum-with-length-divisible-by-k
3427-special-array-ii
3429-special-array-i
3430-count-days-without-meetings
3434-find-the-number-of-distinct-colors-among-the-balls
3461-find-the-minimum-area-to-cover-all-ones-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3483-alternating-groups-ii
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3495-k-th-nearest-obstacle-queries
3501-delete-nodes-from-linked-list-present-in-array
3517-shortest-distance-after-road-addition-queries-i
3522-find-the-power-of-k-size-subarrays-i
3523-find-the-power-of-k-size-subarrays-ii
3528-reach-end-of-array-with-max-score
3551-maximum-xor-score-subarray-queries
3555-final-array-state-after-k-multiplication-operations-i
3579-maximum-possible-number-by-binary-concatenation
3603-check-if-dfs-strings-are-palindromes
3607-minimum-division-operations-to-make-array-non-decreasing
3616-make-array-elements-equal-to-zero
3619-adjacent-increasing-subarrays-detection-ii
3622-maximum-frequency-of-an-element-after-performing-operations-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3643-zero-array-transformation-ii
3646-sum-of-good-subsequences
3648-find-the-maximum-number-of-fruits-collected
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3674-count-non-decreasing-subarrays-after-k-operations
3688-maximize-subarray-sum-after-removing-all-occurrences-of-one-element
3715-maximum-coins-from-k-consecutive-bags
3733-length-of-longest-v-shaped-diagonal-segment
3741-reschedule-meetings-for-maximum-free-time-ii
3748-sort-matrix-by-diagonals
3781-maximize-the-distance-between-points-on-a-square
3788-maximum-unique-subarray-sum-after-deletion
3791-fruits-into-baskets-iii

Dynamic Programming

0072-edit-distance
0118-pascals-triangle
0120-triangle
0188-best-time-to-buy-and-sell-stock-iv
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0300-longest-increasing-subsequence
0312-burst-balloons
0338-counting-bits
0368-largest-divisible-subset
0494-target-sum
0516-longest-palindromic-subsequence
0650-2-keys-keyboard
0664-strange-printer
0689-maximum-sum-of-3-non-overlapping-subarrays
0803-cheapest-flights-within-k-stops
0806-domino-and-tromino-tiling
0867-new-21-game
0905-length-of-longest-fibonacci-subsequence
0934-bitwise-ors-of-subarrays
1008-binary-tree-cameras
1017-odd-even-jump
1063-best-sightseeing-pair
1170-shortest-common-supersequence
1240-stone-game-ii
1250-longest-common-subsequence
1402-count-square-submatrices-with-all-ones
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1586-longest-subarray-of-1s-after-deleting-one-element
1631-number-of-sub-arrays-with-odd-sum
1732-minimum-one-bit-operations-to-make-integers-zero
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1756-minimum-deletions-to-make-string-balanced
1849-maximum-absolute-sum-of-any-subarray
1851-maximum-number-of-events-that-can-be-attended-ii
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete
2067-maximum-number-of-points-with-cost
2090-number-of-ways-to-arrive-at-destination
2164-two-best-non-overlapping-events
2262-solving-questions-with-brainpower
2395-longest-binary-subsequence-less-than-or-equal-to-k
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
2818-maximum-strictly-increasing-cells-in-a-matrix
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3551-maximum-xor-score-subarray-queries
3646-sum-of-good-subsequences
3648-find-the-maximum-number-of-fruits-collected
3688-maximize-subarray-sum-after-removing-all-occurrences-of-one-element
3733-length-of-longest-v-shaped-diagonal-segment

Greedy

0179-largest-number
0611-valid-triangle-number
0624-maximum-distance-in-arrays
0670-maximum-swap
0770-couples-holding-hands
0780-max-chunks-to-make-sorted
0890-lemonade-change
0957-minimum-add-to-make-parentheses-valid
1304-longest-happy-string
1448-maximum-69-number
1478-maximum-number-of-events-that-can-be-attended
1502-construct-k-palindrome-strings
1529-max-difference-you-can-get-from-changing-an-integer
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
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
2095-minimum-number-of-swaps-to-make-the-string-balanced
2140-longest-subsequence-repeated-k-times
2300-construct-string-with-repeat-limit
2395-longest-binary-subsequence-less-than-or-equal-to-k
2456-construct-smallest-number-from-di-string
2488-divide-intervals-into-minimum-number-of-groups
2497-maximum-matching-of-players-with-trainers
2509-minimize-xor
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2616-maximal-score-after-applying-k-operations
2618-maximize-the-minimum-powered-city
2640-maximum-number-of-integers-to-choose-from-a-range-i
2681-put-marbles-in-bags
2689-rearranging-fruits
2704-maximum-difference-by-remapping-a-digit
2716-prime-subtraction-operation
3057-count-k-subsequences-of-a-string-with-maximum-beauty
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii
3493-maximum-number-of-operations-to-move-ones-to-the-end
3528-reach-end-of-array-with-max-score
3607-minimum-division-operations-to-make-array-non-decreasing
3715-maximum-coins-from-k-consecutive-bags
3741-reschedule-meetings-for-maximum-free-time-ii
3781-maximize-the-distance-between-points-on-a-square
3788-maximum-unique-subarray-sum-after-deletion

Sorting

0056-merge-intervals
0075-sort-colors
0179-largest-number
0368-largest-divisible-subset
0539-minimum-time-difference
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
0726-number-of-atoms
0780-max-chunks-to-make-sorted
0948-sort-an-array
1256-rank-transform-of-an-array
1333-sort-the-jumbled-numbers
1468-check-if-n-and-its-double-exist
1478-maximum-number-of-events-that-can-be-attended
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1851-maximum-number-of-events-that-can-be-attended-ii
1962-single-threaded-cpu
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2215-finding-3-digit-even-numbers
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2488-divide-intervals-into-minimum-number-of-groups
2497-maximum-matching-of-players-with-trainers
2502-sort-the-people
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2588-maximum-number-of-points-from-grid-queries
2640-maximum-number-of-integers-to-choose-from-a-range-i
2646-kth-largest-sum-in-a-binary-tree
2681-put-marbles-in-bags
2689-rearranging-fruits
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2818-maximum-strictly-increasing-cells-in-a-matrix
2846-robot-collisions
2887-sort-vowels-in-a-string
2891-maximum-beauty-of-an-array-after-applying-operation
3219-make-lexicographically-smallest-array-by-swapping-elements
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted
3430-count-days-without-meetings
3509-k-th-largest-perfect-subtree-size-in-binary-tree
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3715-maximum-coins-from-k-consecutive-bags
3748-sort-matrix-by-diagonals

Linked List

0023-merge-k-sorted-lists
0432-all-oone-data-structure
0725-split-linked-list-in-parts
1337-design-skiplist
1411-convert-binary-number-in-a-linked-list-to-integer
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Simulation

0498-diagonal-traverse
0906-walking-robot-simulation
0921-spiral-matrix-iii
1642-water-bottles
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2021-remove-all-occurrences-of-a-substring
2048-build-array-from-permutation
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2155-find-missing-observations
2265-partition-array-according-to-given-pivot
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2479-meeting-rooms-iii
2551-apply-operations-to-an-array
2645-pass-the-pillow
2695-find-score-of-an-array-after-marking-all-elements
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions
3434-find-the-number-of-distinct-colors-among-the-balls
3447-clear-digits
3555-final-array-state-after-k-multiplication-operations-i
3616-make-array-elements-equal-to-zero
3768-check-if-digits-are-equal-in-string-after-operations-i

Math

0029-divide-two-integers
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0342-power-of-four
0365-water-and-jug-problem
0368-largest-divisible-subset
0539-minimum-time-difference
0564-find-the-closest-palindrome
0650-2-keys-keyboard
0670-maximum-swap
0679-24-game
0867-new-21-game
0870-magic-squares-in-grid
0989-largest-component-size-by-common-factor
1240-stone-game-ii
1411-convert-binary-number-in-a-linked-list-to-integer
1448-maximum-69-number
1477-product-of-the-last-k-numbers
1500-count-largest-group
1529-max-difference-you-can-get-from-changing-an-integer
1631-number-of-sub-arrays-with-odd-sum
1636-number-of-substrings-with-only-1s
1642-water-bottles
1817-calculate-money-in-leetcode-bank
1951-find-the-winner-of-the-circular-game
1993-sum-of-all-subset-xor-totals
2155-find-missing-observations
2174-next-greater-numerically-balanced-number
2432-number-of-zero-filled-subarrays
2448-count-number-of-bad-pairs
2610-closest-prime-numbers-in-range
2645-pass-the-pillow
2704-maximum-difference-by-remapping-a-digit
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list
3057-count-k-subsequences-of-a-string-with-maximum-beauty
3462-vowels-game-in-a-string
3548-find-the-count-of-good-integers
3555-final-array-state-after-k-multiplication-operations-i
3601-find-the-k-th-character-in-string-game-ii
3607-minimum-division-operations-to-make-array-non-decreasing
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3739-manhattan-distances-of-all-arrangements-of-pieces
3754-maximum-manhattan-distance-after-k-changes
3768-check-if-digits-are-equal-in-string-after-operations-i

Binary Search

0033-search-in-rotated-sorted-array
0240-search-a-2d-matrix-ii
0300-longest-increasing-subsequence
0540-single-element-in-a-sorted-array
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0732-my-calendar-iii
0892-shortest-subarray-with-sum-at-least-k
1335-maximum-candies-allocated-to-k-children
1468-check-if-n-and-its-double-exist
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1851-maximum-number-of-events-that-can-be-attended-ii
2006-find-the-student-that-will-replace-the-chalk
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2280-count-good-triplets-in-an-array
2394-count-subarrays-with-score-less-than-k
2498-smallest-subarrays-with-maximum-bitwise-or
2586-longest-square-streak-in-an-array
2618-maximize-the-minimum-powered-city
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2818-maximum-strictly-increasing-cells-in-a-matrix
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii
3619-adjacent-increasing-subarrays-detection-ii
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3643-zero-array-transformation-ii
3715-maximum-coins-from-k-consecutive-bags
3781-maximize-the-distance-between-points-on-a-square
3791-fruits-into-baskets-iii

Design

0208-implement-trie-prefix-tree
0432-all-oone-data-structure
0715-range-module
0729-my-calendar-i
0731-my-calendar-ii
0732-my-calendar-iii
0789-kth-largest-element-in-a-stream
1337-design-skiplist
1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers
1953-finding-mk-average
2434-design-a-number-container-system

Segment Tree

0715-range-module
0729-my-calendar-i
0731-my-calendar-ii
0732-my-calendar-iii
2280-count-good-triplets-in-an-array
3181-find-building-where-alice-and-bob-can-meet
3674-count-non-decreasing-subarrays-after-k-operations
3688-maximize-subarray-sum-after-removing-all-occurrences-of-one-element
3791-fruits-into-baskets-iii

Prefix Sum

0731-my-calendar-ii
0732-my-calendar-iii
0892-shortest-subarray-with-sum-at-least-k
1240-stone-game-ii
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1477-product-of-the-last-k-numbers
1631-number-of-sub-arrays-with-odd-sum
1694-make-sum-divisible-by-p
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2145-grid-game
2249-count-the-hidden-sequences
2394-count-subarrays-with-score-less-than-k
2465-shifting-letters-ii
2488-divide-intervals-into-minimum-number-of-groups
2618-maximize-the-minimum-powered-city
2691-count-vowel-strings-in-ranges
2915-count-of-interesting-subarrays
3381-maximum-subarray-sum-with-length-divisible-by-k
3427-special-array-ii
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3616-make-array-elements-equal-to-zero
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3643-zero-array-transformation-ii
3715-maximum-coins-from-k-consecutive-bags
3761-maximum-difference-between-even-and-odd-frequency-ii

Ordered Set

0715-range-module
0729-my-calendar-i
0731-my-calendar-ii
0732-my-calendar-iii
1017-odd-even-jump
1953-finding-mk-average
2280-count-good-triplets-in-an-array
2434-design-a-number-container-system
2818-maximum-strictly-increasing-cells-in-a-matrix
2868-continuous-subarrays
3791-fruits-into-baskets-iii

Hash Table

0017-letter-combinations-of-a-phone-number
0030-substring-with-concatenation-of-all-words
0127-word-ladder
0133-clone-graph
0208-implement-trie-prefix-tree
0264-ugly-number-ii
0336-palindrome-pairs
0432-all-oone-data-structure
0690-employee-importance
0726-number-of-atoms
0870-magic-squares-in-grid
0905-length-of-longest-fibonacci-subsequence
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0940-fruit-into-baskets
0952-word-subsets
0964-minimize-malware-spread-ii
0989-largest-component-size-by-common-factor
0999-regions-cut-by-slashes
1006-vowel-spellchecker
1147-flip-columns-for-maximum-number-of-equal-rows
1160-letter-tile-possibilities
1256-rank-transform-of-an-array
1364-tuple-with-same-product
1387-find-elements-in-a-contaminated-binary-tree
1460-number-of-substrings-containing-all-three-characters
1468-check-if-n-and-its-double-exist
1473-find-the-longest-substring-containing-vowels-in-even-counts
1500-count-largest-group
1502-construct-k-palindrome-strings
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1813-maximum-erasure-value
1834-minimum-number-of-people-to-teach
1915-check-if-one-string-swap-can-make-strings-equal
1986-largest-color-value-in-a-directed-graph
2054-the-number-of-the-smallest-unoccupied-chair
2059-unique-length-3-palindromic-subsequences
2107-find-unique-binary-string
2163-kth-distinct-string-in-an-array
2174-next-greater-numerically-balanced-number
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2300-construct-string-with-repeat-limit
2306-create-binary-tree-from-descriptions
2308-divide-array-into-equal-pairs
2356-largest-combination-with-bitwise-and-greater-than-zero
2434-design-a-number-container-system
2448-count-number-of-bad-pairs
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2502-sort-the-people
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2599-take-k-of-each-character-from-left-and-right
2626-count-the-number-of-good-subarrays
2640-maximum-number-of-integers-to-choose-from-a-range-i
2677-cousins-in-binary-tree-ii
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2695-find-score-of-an-array-after-marking-all-elements
2755-extra-characters-in-a-string
2818-maximum-strictly-increasing-cells-in-a-matrix
2856-count-complete-subarrays-in-an-array
2915-count-of-interesting-subarrays
3057-count-k-subsequences-of-a-string-with-maximum-beauty
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3381-maximum-subarray-sum-with-length-divisible-by-k
3434-find-the-number-of-distinct-colors-among-the-balls
3455-minimum-length-of-string-after-operations
3501-delete-nodes-from-linked-list-present-in-array
3502-count-substrings-with-k-frequency-characters-i
3548-find-the-count-of-good-integers
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3603-check-if-dfs-strings-are-palindromes
3646-sum-of-good-subsequences
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3754-maximum-manhattan-distance-after-k-changes
3788-maximum-unique-subarray-sum-after-deletion

String

0017-letter-combinations-of-a-phone-number
0030-substring-with-concatenation-of-all-words
0072-edit-distance
0079-word-search
0127-word-ladder
0179-largest-number
0208-implement-trie-prefix-tree
0212-word-search-ii
0241-different-ways-to-add-parentheses
0336-palindrome-pairs
0394-decode-string
0516-longest-palindromic-subsequence
0539-minimum-time-difference
0564-find-the-closest-palindrome
0664-strange-printer
0726-number-of-atoms
0812-rotate-string
0920-uncommon-words-from-two-sentences
0952-word-subsets
0957-minimum-add-to-make-parentheses-valid
1006-vowel-spellchecker
1058-lexicographically-smallest-equivalent-string
1093-recover-a-tree-from-preorder-traversal
1160-letter-tile-possibilities
1170-shortest-common-supersequence
1197-parsing-a-boolean-expression
1250-longest-common-subsequence
1298-reverse-substrings-between-each-pair-of-parentheses
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1460-number-of-substrings-containing-all-three-characters
1473-find-the-longest-substring-containing-vowels-in-even-counts
1502-construct-k-palindrome-strings
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1636-number-of-substrings-with-only-1s
1667-find-kth-bit-in-nth-binary-string
1720-crawler-log-folder
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
1923-sentence-similarity-iii
2021-remove-all-occurrences-of-a-substring
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2095-minimum-number-of-swaps-to-make-the-string-balanced
2107-find-unique-binary-string
2137-final-value-of-variable-after-performing-operations
2140-longest-subsequence-repeated-k-times
2163-kth-distinct-string-in-an-array
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2220-find-all-possible-recipes-from-given-supplies
2300-construct-string-with-repeat-limit
2346-largest-3-same-digit-number-in-string
2395-longest-binary-subsequence-less-than-or-equal-to-k
2414-move-pieces-to-obtain-a-string
2456-construct-smallest-number-from-di-string
2465-shifting-letters-ii
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2580-circular-sentence
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
2755-extra-characters-in-a-string
2800-minimum-string-length-after-removing-substrings
2887-sort-vowels-in-a-string
3057-count-k-subsequences-of-a-string-with-maximum-beauty
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3194-find-words-containing-character
3195-separate-black-and-white-balls
3235-minimum-cost-to-convert-string-i
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3396-valid-word
3447-clear-digits
3451-string-compression-iii
3453-generate-binary-strings-without-adjacent-zeros
3455-minimum-length-of-string-after-operations
3462-vowels-game-in-a-string
3479-count-the-number-of-substrings-with-dominant-ones
3493-maximum-number-of-operations-to-move-ones-to-the-end
3502-count-substrings-with-k-frequency-characters-i
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3603-check-if-dfs-strings-are-palindromes
3683-find-the-lexicographically-largest-string-from-the-box-i
3754-maximum-manhattan-distance-after-k-changes
3761-maximum-difference-between-even-and-odd-frequency-ii
3768-check-if-digits-are-equal-in-string-after-operations-i

Recursion

0241-different-ways-to-add-parentheses
0342-power-of-four
0394-decode-string
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game
3601-find-the-k-th-character-in-string-game-ii

Queue

0892-shortest-subarray-with-sum-at-least-k
1951-find-the-winner-of-the-circular-game
1953-finding-mk-average
2527-count-subarrays-with-fixed-bounds
2618-maximize-the-minimum-powered-city
2868-continuous-subarrays
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3674-count-non-decreasing-subarrays-after-k-operations

Stack

0394-decode-string
0726-number-of-atoms
0776-n-ary-tree-postorder-traversal
0780-max-chunks-to-make-sorted
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1017-odd-even-jump
1197-parsing-a-boolean-expression
1298-reverse-substrings-between-each-pair-of-parentheses
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
2021-remove-all-occurrences-of-a-substring
2095-minimum-number-of-swaps-to-make-the-string-balanced
2456-construct-smallest-number-from-di-string
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions
3181-find-building-where-alice-and-bob-can-meet
3447-clear-digits
3674-count-non-decreasing-subarrays-after-k-operations

Tree

0236-lowest-common-ancestor-of-a-binary-tree
0515-find-largest-value-in-each-tree-row
0690-employee-importance
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
0988-flip-equivalent-binary-trees
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-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
2400-minimum-score-after-removals-on-a-tree
2493-reverse-odd-levels-of-binary-tree
2564-most-profitable-path-in-a-tree
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees
3509-k-th-largest-perfect-subtree-size-in-binary-tree
3603-check-if-dfs-strings-are-palindromes
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Binary Tree

0236-lowest-common-ancestor-of-a-binary-tree
0515-find-largest-value-in-each-tree-row
0789-kth-largest-element-in-a-stream
0988-flip-equivalent-binary-trees
1008-binary-tree-cameras
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-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
2493-reverse-odd-levels-of-binary-tree
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
3509-k-th-largest-perfect-subtree-size-in-binary-tree

Matrix

0079-word-search
0200-number-of-islands
0212-word-search-ii
0240-search-a-2d-matrix-ii
0407-trapping-rain-water-ii
0498-diagonal-traverse
0787-sliding-puzzle
0854-making-a-large-island
0870-magic-squares-in-grid
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1036-rotting-oranges
1147-flip-columns-for-maximum-number-of-equal-rows
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1496-lucky-numbers-in-a-matrix
1663-detect-cycles-in-2d-grid
1711-find-valid-matrix-given-row-and-column-sums
1876-map-of-highest-peak
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2145-grid-game
2375-minimum-obstacle-removal-to-reach-corner
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions
2588-maximum-number-of-points-from-grid-queries
2685-first-completely-painted-row-or-column
2711-minimum-time-to-visit-a-cell-in-a-grid
2764-maximum-number-of-fish-in-a-grid
2794-maximum-number-of-moves-in-a-grid
2818-maximum-strictly-increasing-cells-in-a-matrix
3461-find-the-minimum-area-to-cover-all-ones-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3648-find-the-maximum-number-of-fruits-collected
3733-length-of-longest-v-shaped-diagonal-segment
3748-sort-matrix-by-diagonals

Divide and Conquer

0023-merge-k-sorted-lists
0240-search-a-2d-matrix-ii
0948-sort-an-array
2280-count-good-triplets-in-an-array

Heap (Priority Queue)

0023-merge-k-sorted-lists
0264-ugly-number-ii
0407-trapping-rain-water-ii
0789-kth-largest-element-in-a-stream
0803-cheapest-flights-within-k-stops
0892-shortest-subarray-with-sum-at-least-k
0948-sort-an-array
1304-longest-happy-string
1325-path-with-maximum-probability
1478-maximum-number-of-events-that-can-be-attended
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1917-maximum-average-pass-ratio
1953-finding-mk-average
1962-single-threaded-cpu
2054-the-number-of-the-smallest-unoccupied-chair
2164-two-best-non-overlapping-events
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2434-design-a-number-container-system
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2488-divide-intervals-into-minimum-number-of-groups
2588-maximum-number-of-points-from-grid-queries
2616-maximal-score-after-applying-k-operations
2681-put-marbles-in-bags
2695-find-score-of-an-array-after-marking-all-elements
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
2868-continuous-subarrays
3181-find-building-where-alice-and-bob-can-meet
3495-k-th-nearest-obstacle-queries
3555-final-array-state-after-k-multiplication-operations-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Merge Sort

0023-merge-k-sorted-lists
0948-sort-an-array
2280-count-good-triplets-in-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0920-uncommon-words-from-two-sentences
0948-sort-an-array
1160-letter-tile-possibilities
1364-tuple-with-same-product
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1620-check-if-array-pairs-are-divisible-by-k
1915-check-if-one-string-swap-can-make-strings-equal
1986-largest-color-value-in-a-directed-graph
2140-longest-subsequence-repeated-k-times
2163-kth-distinct-string-in-an-array
2174-next-greater-numerically-balanced-number
2300-construct-string-with-repeat-limit
2308-divide-array-into-equal-pairs
2356-largest-combination-with-bitwise-and-greater-than-zero
2448-count-number-of-bad-pairs
2494-sum-of-prefix-scores-of-strings
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3455-minimum-length-of-string-after-operations
3493-maximum-number-of-operations-to-move-ones-to-the-end
3754-maximum-manhattan-distance-after-k-changes

Shortest Path

0803-cheapest-flights-within-k-stops
1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
2090-number-of-ways-to-arrive-at-destination
2171-second-minimum-time-to-reach-destination
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Binary Indexed Tree

1511-count-number-of-teams
2280-count-good-triplets-in-an-array
3181-find-building-where-alice-and-bob-can-meet

Sliding Window

0030-substring-with-concatenation-of-all-words
0867-new-21-game
0892-shortest-subarray-with-sum-at-least-k
0940-fruit-into-baskets
1460-number-of-substrings-containing-all-three-characters
1586-longest-subarray-of-1s-after-deleting-one-element
1755-defuse-the-bomb
1813-maximum-erasure-value
2255-minimum-swaps-to-group-all-1s-together-ii
2394-count-subarrays-with-score-less-than-k
2498-smallest-subarrays-with-maximum-bitwise-or
2527-count-subarrays-with-fixed-bounds
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
2618-maximize-the-minimum-powered-city
2626-count-the-number-of-good-subarrays
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3213-count-subarrays-where-max-element-appears-at-least-k-times
3267-find-longest-special-substring-that-occurs-thrice-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3479-count-the-number-of-substrings-with-dominant-ones
3483-alternating-groups-ii
3502-count-substrings-with-k-frequency-characters-i
3522-find-the-power-of-k-size-subarrays-i
3523-find-the-power-of-k-size-subarrays-ii
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3674-count-non-decreasing-subarrays-after-k-operations
3715-maximum-coins-from-k-consecutive-bags
3761-maximum-difference-between-even-and-odd-frequency-ii

Binary Search Tree

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

Data Stream

0789-kth-largest-element-in-a-stream
1477-product-of-the-last-k-numbers
1953-finding-mk-average

Backtracking

0017-letter-combinations-of-a-phone-number
0040-combination-sum-ii
0079-word-search
0212-word-search-ii
0494-target-sum
0679-24-game
1160-letter-tile-possibilities
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1993-sum-of-all-subset-xor-totals
2107-find-unique-binary-string
2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets
2174-next-greater-numerically-balanced-number
2456-construct-smallest-number-from-di-string
3453-generate-binary-strings-without-adjacent-zeros

Two Pointers

0075-sort-colors
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
1002-maximum-width-ramp
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2265-partition-array-according-to-given-pivot
2414-move-pieces-to-obtain-a-string
2488-divide-intervals-into-minimum-number-of-groups
2497-maximum-matching-of-players-with-trainers
2551-apply-operations-to-an-array
2581-divide-players-into-teams-of-equal-skill
2588-maximum-number-of-points-from-grid-queries
2699-count-the-number-of-fair-pairs
3195-separate-black-and-white-balls
3683-find-the-lexicographically-largest-string-from-the-box-i

Game Theory

1240-stone-game-ii
3462-vowels-game-in-a-string

Bit Manipulation

0029-divide-two-integers
0137-single-number-ii
0338-counting-bits
0342-power-of-four
0476-number-complement
0934-bitwise-ors-of-subarrays
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1732-minimum-one-bit-operations-to-make-integers-zero
1993-sum-of-all-subset-xor-totals
2059-unique-length-3-palindromic-subsequences
2170-count-number-of-maximum-bitwise-or-subsets
2308-divide-array-into-equal-pairs
2323-minimum-bit-flips-to-convert-number
2356-largest-combination-with-bitwise-and-greater-than-zero
2400-minimum-score-after-removals-on-a-tree
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2792-neighboring-bitwise-xor
2837-minimum-operations-to-make-the-integer-zero
3291-find-if-array-can-be-sorted
3394-minimum-array-end
3453-generate-binary-strings-without-adjacent-zeros
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3579-maximum-possible-number-by-binary-concatenation
3601-find-the-k-th-character-in-string-game-ii

Trie

0208-implement-trie-prefix-tree
0212-word-search-ii
0336-palindrome-pairs
0386-lexicographical-numbers
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3329-find-the-length-of-the-longest-common-prefix

Number Theory

0989-largest-component-size-by-common-factor
2610-closest-prime-numbers-in-range
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list
3607-minimum-division-operations-to-make-array-non-decreasing
3768-check-if-digits-are-equal-in-string-after-operations-i

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
2837-minimum-operations-to-make-the-integer-zero
3462-vowels-game-in-a-string

Memoization

0241-different-ways-to-add-parentheses
1732-minimum-one-bit-operations-to-make-integers-zero
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete
2395-longest-binary-subsequence-less-than-or-equal-to-k
2818-maximum-strictly-increasing-cells-in-a-matrix
3733-length-of-longest-v-shaped-diagonal-segment

Doubly-Linked List

0432-all-oone-data-structure

Monotonic Stack

0780-max-chunks-to-make-sorted
1002-maximum-width-ramp
1017-odd-even-jump
1679-shortest-subarray-to-be-removed-to-make-array-sorted
3181-find-building-where-alice-and-bob-can-meet
3674-count-non-decreasing-subarrays-after-k-operations

Enumeration

1993-sum-of-all-subset-xor-totals
2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets
2174-next-greater-numerically-balanced-number
2215-finding-3-digit-even-numbers
2837-minimum-operations-to-make-the-integer-zero
3479-count-the-number-of-substrings-with-dominant-ones
3548-find-the-count-of-good-integers
3579-maximum-possible-number-by-binary-concatenation
3683-find-the-lexicographically-largest-string-from-the-box-i
3741-reschedule-meetings-for-maximum-free-time-ii
3761-maximum-difference-between-even-and-odd-frequency-ii

String Matching

0812-rotate-string
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Monotonic Queue

0892-shortest-subarray-with-sum-at-least-k
2527-count-subarrays-with-fixed-bounds
2868-continuous-subarrays
3674-count-non-decreasing-subarrays-after-k-operations

Eulerian Circuit

2201-valid-arrangement-of-pairs

Minimum Spanning Tree

1706-min-cost-to-connect-all-points

Combinatorics

1993-sum-of-all-subset-xor-totals
3057-count-k-subsequences-of-a-string-with-maximum-beauty
3548-find-the-count-of-good-integers
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3739-manhattan-distances-of-all-arrangements-of-pieces
3768-check-if-digits-are-equal-in-string-after-operations-i

Hash Function

3603-check-if-dfs-strings-are-palindromes

Probability and Statistics

0867-new-21-game

About

Collection of Leetcode problems I solve.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages