Skip to content
Sheel34Public

About

Follow our daily problem-solving journey. Contribute alternative solutions or suggestions. Collaborate, learn, and improve as a community

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3,743 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetTrack

Solving 1 LeetCode Question a Day, Every Day!

The Mission

Enhance Coding Skills | Master Algorithms & Data Structures | Showcase Progress on GitHub!

Repository Overview

Daily LeetCode Solutions | Code Explanations | Progress Tracking

What Where
Daily LeetCode Solutions This Repository
Solution Explanations & Insights #discussion

Repository Structure

Easy to Navigate, Simple to Contribute

  • Daily Folders (Day001, Day002, ...)
    • Problem Statement (with LeetCode link)
    • Solution Code (in Python, Java, C)
    • Brief Explanation (for interesting solutions or learnings)
    • Example Use Cases (where applicable)

Engage with the Repository!

Star, Fork, Contribute, and Discuss

  1. Star this repository to track progress
  2. Fork and Contribute with your own solutions or suggestions
  3. Discuss solutions and ask questions in the #discussion
  4. Watch for updates to stay notified of new solutions

Star | Fork | Contribute | Discuss

Latest Solution: View Latest Folder

Discussion

Ask, Share, Discuss!

  • Questions about solutions? Ask here!
  • Better approach? Share your thoughts!
  • Need help with a similar problem? Post a query!

LeetCode Topics

Hash Table

0001-two-sum
0036-valid-sudoku
0037-sudoku-solver
0073-set-matrix-zeroes
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0160-intersection-of-two-linked-lists
0166-fraction-to-recurring-decimal
0594-longest-harmonious-subsequence
0756-pyramid-transition-matrix
0768-partition-labels
0782-jewels-and-stones
0797-rabbits-in-forest
0840-magic-squares-in-grid
0865-smallest-subtree-with-all-the-deepest-nodes
0900-reordered-power-of-2
0905-length-of-longest-fibonacci-subsequence
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0940-fruit-into-baskets
0952-word-subsets
0961-n-repeated-element-in-size-2n-array
1006-vowel-spellchecker
1015-smallest-integer-divisible-by-k
1147-flip-columns-for-maximum-number-of-equal-rows
1160-letter-tile-possibilities
1218-lowest-common-ancestor-of-deepest-leaves
1227-number-of-equivalent-domino-pairs
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
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
1500-count-largest-group
1502-construct-k-palindrome-strings
1510-find-lucky-integer-in-an-array
1590-make-sum-divisible-by-p
1612-avoid-flood-in-the-city
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
1995-finding-pairs-with-a-certain-sum
2023-design-movie-rental-system
2059-unique-length-3-palindromic-subsequences
2079-delete-duplicate-folders-in-system
2107-find-unique-binary-string
2169-simple-bank-system
2174-next-greater-numerically-balanced-number
2204-find-subsequence-of-length-k-with-the-largest-sum
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2237-longest-palindrome-by-concatenating-two-letter-words
2274-keep-multiplying-found-values-by-two
2300-construct-string-with-repeat-limit
2308-divide-array-into-equal-pairs
2402-meeting-rooms-iii
2429-design-a-food-rating-system
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
2520-using-a-robot-to-print-the-lexicographically-smallest-string
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
2661-smallest-missing-non-negative-integer-after-operations
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2695-find-score-of-an-array-after-marking-all-elements
2707-merge-two-2d-arrays-by-summing-values
2766-find-the-prefix-common-array-of-two-arrays
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
2915-count-of-interesting-subarrays
2975-maximum-square-area-by-removing-fences-from-a-field
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3360-minimum-deletions-to-make-string-k-special
3381-maximum-subarray-sum-with-length-divisible-by-k
3434-find-the-number-of-distinct-colors-among-the-balls
3437-maximum-total-damage-with-spell-casting
3445-lexicographically-minimum-string-after-removing-stars
3455-minimum-length-of-string-after-operations
3501-delete-nodes-from-linked-list-present-in-array
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii
3531-count-covered-buildings
3548-find-the-count-of-good-integers
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3581-the-two-sneaky-numbers-of-digitville
3583-count-special-triplets
3592-find-x-sum-of-all-k-long-subarrays-ii
3606-coupon-code-validator
3610-find-x-sum-of-all-k-long-subarrays-i
3621-minimum-operations-to-make-array-values-equal-to-k
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3678-design-task-manager
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3788-maximum-unique-subarray-sum-after-deletion
3797-design-spreadsheet
3827-implement-router
3834-minimum-operations-to-convert-all-elements-to-zero
3863-power-grid-maintenance
3872-find-most-frequent-vowel-and-consonant

String

0020-valid-parentheses
0038-count-and-say
0072-edit-distance
0165-compare-version-numbers
0166-fraction-to-recurring-decimal
0474-ones-and-zeroes
0712-minimum-ascii-delete-sum-for-two-strings
0756-pyramid-transition-matrix
0768-partition-labels
0782-jewels-and-stones
0868-push-dominoes
0944-delete-columns-to-make-sorted
0952-word-subsets
0955-delete-columns-to-make-sorted-ii
0960-delete-columns-to-make-sorted-iii
1006-vowel-spellchecker
1058-lexicographically-smallest-equivalent-string
1093-recover-a-tree-from-preorder-traversal
1160-letter-tile-possibilities
1170-shortest-common-supersequence
1264-maximum-number-of-words-you-can-type
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1353-find-resultant-array-after-removing-anagrams
1460-number-of-substrings-containing-all-three-characters
1502-construct-k-palindrome-strings
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1636-number-of-substrings-with-only-1s
1700-minimum-time-to-make-rope-colorful
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1747-lexicographically-smallest-string-after-applying-operations
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
2021-remove-all-occurrences-of-a-substring
2059-unique-length-3-palindromic-subsequences
2079-delete-duplicate-folders-in-system
2107-find-unique-binary-string
2137-final-value-of-variable-after-performing-operations
2140-longest-subsequence-repeated-k-times
2147-number-of-ways-to-divide-a-long-corridor
2211-count-collisions-on-a-road
2220-find-all-possible-recipes-from-given-supplies
2221-check-if-a-parentheses-string-can-be-valid
2232-adding-spaces-to-a-string
2237-longest-palindrome-by-concatenating-two-letter-words
2244-number-of-laser-beams-in-a-bank
2260-divide-a-string-into-groups-of-size-k
2292-counting-words-with-a-given-prefix
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
2429-design-a-food-rating-system
2456-construct-smallest-number-from-di-string
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2465-shifting-letters-ii
2483-minimum-penalty-for-a-shop
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
2887-sort-vowels-in-a-string
3018-make-string-a-subsequence-using-cyclic-increments
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3194-find-words-containing-character
3233-maximize-the-number-of-partitions-after-operations
3243-count-the-number-of-powerful-integers
3267-find-longest-special-substring-that-occurs-thrice-i
3309-count-prefix-and-suffix-pairs-i
3360-minimum-deletions-to-make-string-k-special
3396-valid-word
3445-lexicographically-minimum-string-after-removing-stars
3447-clear-digits
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
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3606-coupon-code-validator
3617-find-the-original-typed-string-i
3618-find-the-original-typed-string-ii
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations
3683-find-the-lexicographically-largest-string-from-the-box-i
3753-maximum-difference-between-even-and-odd-frequency-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
3797-design-spreadsheet
3872-find-most-frequent-vowel-and-consonant

Sliding Window

0594-longest-harmonious-subsequence
0867-new-21-game
0940-fruit-into-baskets
1460-number-of-substrings-containing-all-three-characters
1586-longest-subarray-of-1s-after-deleting-one-element
1813-maximum-erasure-value
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2229-maximum-fruits-harvested-after-at-most-k-steps
2394-count-subarrays-with-score-less-than-k
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2478-longest-nice-subarray
2498-smallest-subarrays-with-maximum-bitwise-or
2527-count-subarrays-with-fixed-bounds
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
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii
3578-count-partitions-with-max-min-difference-at-most-k
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3652-best-time-to-buy-and-sell-stock-using-strategy
3743-reschedule-meetings-for-maximum-free-time-i
3761-maximum-difference-between-even-and-odd-frequency-ii

Array

0001-two-sum
0011-container-with-most-water
0036-valid-sudoku
0037-sudoku-solver
0066-plus-one
0073-set-matrix-zeroes
0075-sort-colors
0085-maximal-rectangle
0118-pascals-triangle
0120-triangle
0135-candy
0200-number-of-islands
0368-largest-divisible-subset
0407-trapping-rain-water-ii
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0474-ones-and-zeroes
0485-max-consecutive-ones
0494-target-sum
0498-diagonal-traverse
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0679-24-game
0689-maximum-sum-of-3-non-overlapping-subarrays
0717-1-bit-and-2-bit-characters
0759-set-intersection-size-at-least-two
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0794-swim-in-rising-water
0797-rabbits-in-forest
0830-largest-triangle-area
0840-magic-squares-in-grid
0854-making-a-large-island
0905-length-of-longest-fibonacci-subsequence
0909-stone-game
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
0944-delete-columns-to-make-sorted
0945-snakes-and-ladders
0952-word-subsets
0955-delete-columns-to-make-sorted-ii
0960-delete-columns-to-make-sorted-iii
0961-n-repeated-element-in-size-2n-array
1006-vowel-spellchecker
1018-largest-perimeter-triangle
1018-binary-prefix-divisible-by-5
1025-minimum-cost-for-tickets
1049-minimum-domino-rotations-for-equal-row
1063-best-sightseeing-pair
1111-minimum-score-triangulation-of-polygon
1147-flip-columns-for-maximum-number-of-equal-rows
1200-minimum-absolute-difference
1227-number-of-equivalent-domino-pairs
1262-greatest-sum-divisible-by-three
1266-minimum-time-visiting-all-points
1292-maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold
1293-three-consecutive-odds
1335-maximum-candies-allocated-to-k-children
1350-remove-sub-folders-from-the-filesystem
1351-count-negative-numbers-in-a-sorted-matrix
1353-find-resultant-array-after-removing-anagrams
1364-tuple-with-same-product
1372-check-if-it-is-a-good-array
1390-four-divisors
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1421-find-numbers-with-even-number-of-digits
1424-maximum-candies-you-can-get-from-boxes
1426-find-n-unique-integers-sum-up-to-zero
1458-max-dot-product-of-two-subsequences
1468-check-if-n-and-its-double-exist
1470-shuffle-the-array
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
1510-find-lucky-integer-in-an-array
1524-string-matching-in-an-array
1548-check-if-all-1s-are-at-least-length-k-places-away
1570-final-prices-with-a-special-discount-in-a-shop
1586-longest-subarray-of-1s-after-deleting-one-element
1590-make-sum-divisible-by-p
1612-avoid-flood-in-the-city
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1628-count-submatrices-with-all-ones
1631-number-of-sub-arrays-with-odd-sum
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1656-count-good-triplets
1700-minimum-time-to-make-rope-colorful
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1813-maximum-erasure-value
1819-construct-the-lexicographically-largest-valid-sequence
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
1886-minimum-limit-of-balls-in-a-bag
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1895-largest-magic-square
1917-maximum-average-pass-ratio
1927-maximum-ascending-subarray-sum
1929-concatenation-of-array
1970-last-day-where-you-can-still-cross
1972-rotating-the-box
1975-maximum-matrix-sum
1984-minimum-difference-between-highest-and-lowest-of-k-scores
1993-sum-of-all-subset-xor-totals
1995-finding-pairs-with-a-certain-sum
2023-design-movie-rental-system
2048-build-array-from-permutation
2054-two-best-non-overlapping-events
2079-delete-duplicate-folders-in-system
2089-maximum-matrix-sum
2107-find-unique-binary-string
2110-number-of-smooth-descent-periods-of-a-stock
2137-final-value-of-variable-after-performing-operations
2141-maximum-running-time-of-n-computers
2144-maximum-difference-between-increasing-elements
2145-grid-game
2150-kth-smallest-product-of-two-sorted-arrays
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2169-simple-bank-system
2170-count-number-of-maximum-bitwise-or-subsets
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2229-maximum-fruits-harvested-after-at-most-k-steps
2232-adding-spaces-to-a-string
2237-longest-palindrome-by-concatenating-two-letter-words
2244-number-of-laser-beams-in-a-bank
2249-count-the-hidden-sequences
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2267-minimum-difference-in-sums-after-removal-of-elements
2274-keep-multiplying-found-values-by-two
2277-count-equal-and-divisible-pairs-in-an-array
2280-count-good-triplets-in-an-array
2292-counting-words-with-a-given-prefix
2307-replace-non-coprime-numbers-in-array
2308-divide-array-into-equal-pairs
2316-count-hills-and-valleys-in-an-array
2320-find-all-k-distant-indices-in-an-array
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2358-number-of-ways-to-split-array
2375-minimum-obstacle-removal-to-reach-corner
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2400-minimum-score-after-removals-on-a-tree
2402-meeting-rooms-iii
2429-design-a-food-rating-system
2432-number-of-zero-filled-subarrays
2435-paths-in-matrix-whose-sum-is-divisible-by-k
2448-count-number-of-bad-pairs
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2478-longest-nice-subarray
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2527-count-subarrays-with-fixed-bounds
2529-range-product-queries-of-powers
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2564-most-profitable-path-in-a-tree
2588-maximum-number-of-points-from-grid-queries
2614-maximum-count-of-positive-integer-and-negative-integer
2618-maximize-the-minimum-powered-city
2625-increment-submatrices-by-one
2626-count-the-number-of-good-subarrays
2640-maximum-number-of-integers-to-choose-from-a-range-i
2661-smallest-missing-non-negative-integer-after-operations
2665-minimum-time-to-repair-cars
2681-put-marbles-in-bags
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2690-house-robber-iv
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2711-minimum-time-to-visit-a-cell-in-a-grid
2720-minimize-the-maximum-difference-of-pairs
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
2764-maximum-number-of-fish-in-a-grid
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
2915-count-of-interesting-subarrays
2943-maximize-area-of-square-hole-in-grid
2975-maximum-square-area-by-removing-fences-from-a-field
3001-apply-operations-to-maximize-score
3047-find-the-largest-area-of-square-inside-two-rectangles
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3152-maximum-value-of-an-ordered-triplet-ii
3154-maximum-value-of-an-ordered-triplet-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3181-find-building-where-alice-and-bob-can-meet
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3194-find-words-containing-character
3213-count-subarrays-where-max-element-appears-at-least-k-times
3219-make-lexicographically-smallest-array-by-swapping-elements
3241-divide-array-into-arrays-with-max-difference
3242-count-elements-with-maximum-frequency
3251-maximum-area-of-longest-diagonal-rectangle
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3307-find-the-maximum-sum-of-node-values
3309-count-prefix-and-suffix-pairs-i
3314-construct-the-minimum-bitwise-array-i
3315-construct-the-minimum-bitwise-array-ii
3321-type-of-triangle
3332-minimum-operations-to-exceed-threshold-value-ii
3348-minimum-cost-walk-in-weighted-graph
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3381-maximum-subarray-sum-with-length-divisible-by-k
3383-taking-maximum-energy-from-the-mystic-dungeon
3427-special-array-ii
3429-special-array-i
3430-count-days-without-meetings
3432-count-partitions-with-even-sum-difference
3433-count-mentions-per-user
3434-find-the-number-of-distinct-colors-among-the-balls
3437-maximum-total-damage-with-spell-casting
3453-separate-squares-i
3454-separate-squares-ii
3459-find-the-minimum-area-to-cover-all-ones-ii
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
3501-delete-nodes-from-linked-list-present-in-array
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii
3512-minimum-operations-to-make-array-sum-divisible-by-k
3517-shortest-distance-after-road-addition-queries-i
3531-count-covered-buildings
3555-final-array-state-after-k-multiplication-operations-i
3562-maximum-profit-from-trading-stocks-with-discounts
3573-best-time-to-buy-and-sell-stock-v
3577-count-the-number-of-computer-unlocking-permutations
3578-count-partitions-with-max-min-difference-at-most-k
3581-the-two-sneaky-numbers-of-digitville
3583-count-special-triplets
3592-find-x-sum-of-all-k-long-subarrays-ii
3606-coupon-code-validator
3610-find-x-sum-of-all-k-long-subarrays-i
3612-adjacent-increasing-subarrays-detection-i
3616-make-array-elements-equal-to-zero
3619-adjacent-increasing-subarrays-detection-ii
3620-maximum-number-of-distinct-elements-after-operations
3621-minimum-operations-to-make-array-values-equal-to-k
3622-maximum-frequency-of-an-element-after-performing-operations-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3637-trionic-array-i
3639-zero-array-transformation-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3643-zero-array-transformation-ii
3647-zero-array-transformation-iii
3648-find-the-maximum-number-of-fruits-collected
3652-best-time-to-buy-and-sell-stock-using-strategy
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3657-check-if-grid-can-be-cut-into-sections
3685-count-subarrays-of-length-three-with-a-condition
3733-length-of-longest-v-shaped-diagonal-segment
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3744-minimum-operations-to-make-array-elements-zero
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3748-sort-matrix-by-diagonals
3788-maximum-unique-subarray-sum-after-deletion
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii
3794-find-the-minimum-amount-of-time-to-brew-potions
3797-design-spreadsheet
3827-implement-router
3834-minimum-operations-to-convert-all-elements-to-zero
3851-find-sum-of-array-product-of-magical-sequences
3863-power-grid-maintenance

Matrix

0036-valid-sudoku
0037-sudoku-solver
0073-set-matrix-zeroes
0085-maximal-rectangle
0200-number-of-islands
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0498-diagonal-traverse
0787-sliding-puzzle
0794-swim-in-rising-water
0840-magic-squares-in-grid
0854-making-a-large-island
0945-snakes-and-ladders
1147-flip-columns-for-maximum-number-of-equal-rows
1292-maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold
1351-count-negative-numbers-in-a-sorted-matrix
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
1628-count-submatrices-with-all-ones
1876-map-of-highest-peak
1895-largest-magic-square
1970-last-day-where-you-can-still-cross
1972-rotating-the-box
1975-maximum-matrix-sum
2089-maximum-matrix-sum
2145-grid-game
2160-minimum-operations-to-make-a-uni-value-grid
2244-number-of-laser-beams-in-a-bank
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2435-paths-in-matrix-whose-sum-is-divisible-by-k
2588-maximum-number-of-points-from-grid-queries
2625-increment-submatrices-by-one
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
3459-find-the-minimum-area-to-cover-all-ones-ii
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
3797-design-spreadsheet

Simulation

0498-diagonal-traverse
1642-water-bottles
1929-concatenation-of-array
2021-remove-all-occurrences-of-a-substring
2048-build-array-from-permutation
2137-final-value-of-variable-after-performing-operations
2169-simple-bank-system
2211-count-collisions-on-a-road
2232-adding-spaces-to-a-string
2260-divide-a-string-into-groups-of-size-k
2265-partition-array-according-to-given-pivot
2274-keep-multiplying-found-values-by-two
2288-count-operations-to-obtain-zero
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2402-meeting-rooms-iii
2408-number-of-people-aware-of-a-secret
2479-meeting-rooms-iii
2551-apply-operations-to-an-array
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
3332-minimum-operations-to-exceed-threshold-value-ii
3336-water-bottles-ii
3433-count-mentions-per-user
3434-find-the-number-of-distinct-colors-among-the-balls
3447-clear-digits
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i
3616-make-array-elements-equal-to-zero
3768-check-if-digits-are-equal-in-string-after-operations-i
3790-fruits-into-baskets-ii
3794-find-the-minimum-amount-of-time-to-brew-potions

Two Pointers

0011-container-with-most-water
0075-sort-colors
0086-partition-list
0141-linked-list-cycle
0143-reorder-list
0160-intersection-of-two-linked-lists
0165-compare-version-numbers
0234-palindrome-linked-list
0611-valid-triangle-number
0768-partition-labels
0868-push-dominoes
0908-middle-of-the-linked-list
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1972-rotating-the-box
2232-adding-spaces-to-a-string
2265-partition-array-according-to-given-pivot
2320-find-all-k-distant-indices-in-an-array
2392-successful-pairs-of-spells-and-potions
2414-move-pieces-to-obtain-a-string
2497-maximum-matching-of-players-with-trainers
2551-apply-operations-to-an-array
2588-maximum-number-of-points-from-grid-queries
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
3018-make-string-a-subsequence-using-cyclic-increments
3437-maximum-total-damage-with-spell-casting
3683-find-the-lexicographically-largest-string-from-the-box-i

Greedy

0011-container-with-most-water
0135-candy
0611-valid-triangle-number
0759-set-intersection-size-at-least-two
0768-partition-labels
0780-max-chunks-to-make-sorted
0797-rabbits-in-forest
0955-delete-columns-to-make-sorted-ii
1018-largest-perimeter-triangle
1049-minimum-domino-rotations-for-equal-row
1262-greatest-sum-divisible-by-three
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
1612-avoid-flood-in-the-city
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1818-maximum-score-from-removing-substrings
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
1975-maximum-matrix-sum
2089-maximum-matrix-sum
2140-longest-subsequence-repeated-k-times
2141-maximum-running-time-of-n-computers
2180-maximum-number-of-tasks-you-can-assign
2221-check-if-a-parentheses-string-can-be-valid
2237-longest-palindrome-by-concatenating-two-letter-words
2300-construct-string-with-repeat-limit
2387-partition-array-such-that-maximum-difference-is-k
2395-longest-binary-subsequence-less-than-or-equal-to-k
2456-construct-smallest-number-from-di-string
2497-maximum-matching-of-players-with-trainers
2509-minimize-xor
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2618-maximize-the-minimum-powered-city
2640-maximum-number-of-integers-to-choose-from-a-range-i
2661-smallest-missing-non-negative-integer-after-operations
2681-put-marbles-in-bags
2689-rearranging-fruits
2704-maximum-difference-by-remapping-a-digit
2720-minimize-the-maximum-difference-of-pairs
3001-apply-operations-to-maximize-score
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3241-divide-array-into-arrays-with-max-difference
3307-find-the-maximum-sum-of-node-values
3360-minimum-deletions-to-make-string-k-special
3445-lexicographically-minimum-string-after-removing-stars
3493-maximum-number-of-operations-to-move-ones-to-the-end
3620-maximum-number-of-distinct-elements-after-operations
3647-zero-array-transformation-iii
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion
3834-minimum-operations-to-convert-all-elements-to-zero

Breadth-First Search

0200-number-of-islands
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0787-sliding-puzzle
0794-swim-in-rising-water
0820-find-eventual-safe-states
0854-making-a-large-island
0865-smallest-subtree-with-all-the-deepest-nodes
0945-snakes-and-ladders
1161-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1424-maximum-candies-you-can-get-from-boxes
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1747-lexicographically-smallest-string-after-applying-operations
1876-map-of-highest-peak
1970-last-day-where-you-can-still-cross
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
2375-minimum-obstacle-removal-to-reach-corner
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2564-most-profitable-path-in-a-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2588-maximum-number-of-points-from-grid-queries
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
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii
3863-power-grid-maintenance

Graph

0684-redundant-connection
0820-find-eventual-safe-states
1424-maximum-candies-you-can-get-from-boxes
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1916-find-center-of-star-graph
1986-largest-color-value-in-a-directed-graph
2090-number-of-ways-to-arrive-at-destination
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
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
2438-find-closest-node-to-given-two-nodes
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
3189-find-champion-ii
3348-minimum-cost-walk-in-weighted-graph
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
3863-power-grid-maintenance

Heap (Priority Queue)

0407-trapping-rain-water-ii
0794-swim-in-rising-water
1478-maximum-number-of-events-that-can-be-attended
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1612-avoid-flood-in-the-city
1917-maximum-average-pass-ratio
2023-design-movie-rental-system
2054-two-best-non-overlapping-events
2164-two-best-non-overlapping-events
2204-find-subsequence-of-length-k-with-the-largest-sum
2267-minimum-difference-in-sums-after-removal-of-elements
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2402-meeting-rooms-iii
2429-design-a-food-rating-system
2434-design-a-number-container-system
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2588-maximum-number-of-points-from-grid-queries
2681-put-marbles-in-bags
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2711-minimum-time-to-visit-a-cell-in-a-grid
2868-continuous-subarrays
3181-find-building-where-alice-and-bob-can-meet
3332-minimum-operations-to-exceed-threshold-value-ii
3445-lexicographically-minimum-string-after-removing-stars
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii
3555-final-array-state-after-k-multiplication-operations-i
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3647-zero-array-transformation-iii
3650-minimum-cost-path-with-edge-reversals
3678-design-task-manager
3863-power-grid-maintenance

Shortest Path

1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
2090-number-of-ways-to-arrive-at-destination
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3650-minimum-cost-path-with-edge-reversals

Depth-First Search

0110-balanced-binary-tree
0200-number-of-islands
0386-lexicographical-numbers
0417-pacific-atlantic-water-flow
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0794-swim-in-rising-water
0820-find-eventual-safe-states
0854-making-a-large-island
0865-smallest-subtree-with-all-the-deepest-nodes
0975-range-sum-of-bst
1093-recover-a-tree-from-preorder-traversal
1161-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1339-maximum-product-of-splitted-binary-tree
1350-remove-sub-folders-from-the-filesystem
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1558-course-schedule-iv
1747-lexicographically-smallest-string-after-applying-operations
1970-last-day-where-you-can-still-cross
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
2201-valid-arrangement-of-pairs
2246-maximum-employees-to-be-invited-to-a-meeting
2400-minimum-score-after-removals-on-a-tree
2438-find-closest-node-to-given-two-nodes
2493-reverse-odd-levels-of-binary-tree
2564-most-profitable-path-in-a-tree
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
2872-maximum-number-of-k-divisible-components
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees
3562-maximum-profit-from-trading-stocks-with-discounts
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii
3863-power-grid-maintenance

Eulerian Circuit

2201-valid-arrangement-of-pairs

Binary Search

0222-count-complete-tree-nodes
0611-valid-triangle-number
0794-swim-in-rising-water
1292-maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold
1335-maximum-candies-allocated-to-k-children
1351-count-negative-numbers-in-a-sorted-matrix
1468-check-if-n-and-its-double-exist
1612-avoid-flood-in-the-city
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1851-maximum-number-of-events-that-can-be-attended-ii
1886-minimum-limit-of-balls-in-a-bag
1970-last-day-where-you-can-still-cross
2054-two-best-non-overlapping-events
2141-maximum-running-time-of-n-computers
2150-kth-smallest-product-of-two-sorted-arrays
2164-two-best-non-overlapping-events
2180-maximum-number-of-tasks-you-can-assign
2229-maximum-fruits-harvested-after-at-most-k-steps
2280-count-good-triplets-in-an-array
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2498-smallest-subarrays-with-maximum-bitwise-or
2614-maximum-count-of-positive-integer-and-negative-integer
2618-maximize-the-minimum-powered-city
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
2690-house-robber-iv
2699-count-the-number-of-fair-pairs
2720-minimize-the-maximum-difference-of-pairs
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
3437-maximum-total-damage-with-spell-casting
3453-separate-squares-i
3454-separate-squares-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
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii
3827-implement-router

Sorting

0075-sort-colors
0368-largest-divisible-subset
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0759-set-intersection-size-at-least-two
0780-max-chunks-to-make-sorted
0900-reordered-power-of-2
1018-largest-perimeter-triangle
1200-minimum-absolute-difference
1262-greatest-sum-divisible-by-three
1353-find-resultant-array-after-removing-anagrams
1468-check-if-n-and-its-double-exist
1478-maximum-number-of-events-that-can-be-attended
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1851-maximum-number-of-events-that-can-be-attended-ii
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2054-two-best-non-overlapping-events
2092-find-all-people-with-secret
2141-maximum-running-time-of-n-computers
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2215-finding-3-digit-even-numbers
2274-keep-multiplying-found-values-by-two
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
2402-meeting-rooms-iii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2588-maximum-number-of-points-from-grid-queries
2640-maximum-number-of-integers-to-choose-from-a-range-i
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
2887-sort-vowels-in-a-string
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
2943-maximize-area-of-square-hole-in-grid
3001-apply-operations-to-maximize-score
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3219-make-lexicographically-smallest-array-by-swapping-elements
3241-divide-array-into-arrays-with-max-difference
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3360-minimum-deletions-to-make-string-k-special
3430-count-days-without-meetings
3433-count-mentions-per-user
3437-maximum-total-damage-with-spell-casting
3531-count-covered-buildings
3606-coupon-code-validator
3620-maximum-number-of-distinct-elements-after-operations
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3647-zero-array-transformation-iii
3657-check-if-grid-can-be-cut-into-sections
3748-sort-matrix-by-diagonals

String Matching

1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
2292-counting-words-with-a-given-prefix
3309-count-prefix-and-suffix-pairs-i

Dynamic Programming

0072-edit-distance
0085-maximal-rectangle
0118-pascals-triangle
0120-triangle
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0474-ones-and-zeroes
0494-target-sum
0689-maximum-sum-of-3-non-overlapping-subarrays
0712-minimum-ascii-delete-sum-for-two-strings
0806-domino-and-tromino-tiling
0826-soup-servings
0867-new-21-game
0868-push-dominoes
0905-length-of-longest-fibonacci-subsequence
0909-stone-game
0934-bitwise-ors-of-subarrays
0960-delete-columns-to-make-sorted-iii
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1111-minimum-score-triangulation-of-polygon
1170-shortest-common-supersequence
1262-greatest-sum-divisible-by-three
1402-count-square-submatrices-with-all-ones
1411-number-of-ways-to-paint-n-3-grid
1458-max-dot-product-of-two-subsequences
1461-count-all-valid-pickup-and-delivery-options
1586-longest-subarray-of-1s-after-deleting-one-element
1628-count-submatrices-with-all-ones
1631-number-of-sub-arrays-with-odd-sum
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1732-minimum-one-bit-operations-to-make-integers-zero
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
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
2054-two-best-non-overlapping-events
2061-painting-a-grid-with-three-different-colors
2090-number-of-ways-to-arrive-at-destination
2110-number-of-smooth-descent-periods-of-a-stock
2147-number-of-ways-to-divide-a-long-corridor
2164-two-best-non-overlapping-events
2262-solving-questions-with-brainpower
2267-minimum-difference-in-sums-after-removal-of-elements
2395-longest-binary-subsequence-less-than-or-equal-to-k
2408-number-of-people-aware-of-a-secret
2415-count-the-number-of-ideal-arrays
2435-paths-in-matrix-whose-sum-is-divisible-by-k
2562-count-ways-to-build-good-strings
2882-ways-to-express-an-integer-as-sum-of-powers
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3233-maximize-the-number-of-partitions-after-operations
3243-count-the-number-of-powerful-integers
3307-find-the-maximum-sum-of-node-values
3437-maximum-total-damage-with-spell-casting
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3562-maximum-profit-from-trading-stocks-with-discounts
3573-best-time-to-buy-and-sell-stock-v
3578-count-partitions-with-max-min-difference-at-most-k
3618-find-the-original-typed-string-ii
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations
3648-find-the-maximum-number-of-fruits-collected
3733-length-of-longest-v-shaped-diagonal-segment
3851-find-sum-of-array-product-of-magical-sequences

Prefix Sum

1292-maximum-side-length-of-a-square-with-sum-less-than-or-equal-to-threshold
1477-product-of-the-last-k-numbers
1537-maximum-score-after-splitting-a-string
1590-make-sum-divisible-by-p
1631-number-of-sub-arrays-with-odd-sum
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1895-largest-magic-square
2059-unique-length-3-palindromic-subsequences
2145-grid-game
2229-maximum-fruits-harvested-after-at-most-k-steps
2249-count-the-hidden-sequences
2358-number-of-ways-to-split-array
2394-count-subarrays-with-score-less-than-k
2465-shifting-letters-ii
2483-minimum-penalty-for-a-shop
2529-range-product-queries-of-powers
2618-maximize-the-minimum-powered-city
2625-increment-submatrices-by-one
2691-count-vowel-strings-in-ranges
2915-count-of-interesting-subarrays
3381-maximum-subarray-sum-with-length-divisible-by-k
3383-taking-maximum-energy-from-the-mystic-dungeon
3427-special-array-ii
3432-count-partitions-with-even-sum-difference
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3578-count-partitions-with-max-min-difference-at-most-k
3616-make-array-elements-equal-to-zero
3618-find-the-original-typed-string-ii
3622-maximum-frequency-of-an-element-after-performing-operations-i
3639-zero-array-transformation-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3643-zero-array-transformation-ii
3647-zero-array-transformation-iii
3652-best-time-to-buy-and-sell-stock-using-strategy
3761-maximum-difference-between-even-and-odd-frequency-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair
3794-find-the-minimum-amount-of-time-to-brew-potions

Counting

0594-longest-harmonious-subsequence
0900-reordered-power-of-2
1160-letter-tile-possibilities
1227-number-of-equivalent-domino-pairs
1364-tuple-with-same-product
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1510-find-lucky-integer-in-an-array
1915-check-if-one-string-swap-can-make-strings-equal
1986-largest-color-value-in-a-directed-graph
2140-longest-subsequence-repeated-k-times
2174-next-greater-numerically-balanced-number
2237-longest-palindrome-by-concatenating-two-letter-words
2300-construct-string-with-repeat-limit
2308-divide-array-into-equal-pairs
2448-count-number-of-bad-pairs
2614-maximum-count-of-positive-integer-and-negative-integer
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3360-minimum-deletions-to-make-string-k-special
3437-maximum-total-damage-with-spell-casting
3455-minimum-length-of-string-after-operations
3493-maximum-number-of-operations-to-move-ones-to-the-end
3583-count-special-triplets
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3872-find-most-frequent-vowel-and-consonant

Queue

2180-maximum-number-of-tasks-you-can-assign
2408-number-of-people-aware-of-a-secret
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
3578-count-partitions-with-max-min-difference-at-most-k
3827-implement-router

Ordered Set

2023-design-movie-rental-system
2280-count-good-triplets-in-an-array
2429-design-a-food-rating-system
2434-design-a-number-container-system
2868-continuous-subarrays
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii
3678-design-task-manager
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii
3827-implement-router
3863-power-grid-maintenance

Monotonic Queue

2180-maximum-number-of-tasks-you-can-assign
2527-count-subarrays-with-fixed-bounds
2868-continuous-subarrays
3578-count-partitions-with-max-min-difference-at-most-k

Math

0066-plus-one
0166-fraction-to-recurring-decimal
0231-power-of-two
0326-power-of-three
0342-power-of-four
0368-largest-divisible-subset
0679-24-game
0797-rabbits-in-forest
0826-soup-servings
0830-largest-triangle-area
0840-magic-squares-in-grid
0867-new-21-game
0900-reordered-power-of-2
0909-stone-game
1015-smallest-integer-divisible-by-k
1018-largest-perimeter-triangle
1266-minimum-time-visiting-all-points
1372-check-if-it-is-a-good-array
1390-four-divisors
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1448-maximum-69-number
1461-count-all-valid-pickup-and-delivery-options
1477-product-of-the-last-k-numbers
1500-count-largest-group
1523-count-odd-numbers-in-an-interval-range
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
1889-check-if-number-is-a-sum-of-powers-of-three
1925-count-square-sum-triples
1993-sum-of-all-subset-xor-totals
2050-count-good-numbers
2110-number-of-smooth-descent-periods-of-a-stock
2147-number-of-ways-to-divide-a-long-corridor
2160-minimum-operations-to-make-a-uni-value-grid
2174-next-greater-numerically-balanced-number
2202-sum-of-k-mirror-numbers
2244-number-of-laser-beams-in-a-bank
2288-count-operations-to-obtain-zero
2307-replace-non-coprime-numbers-in-array
2324-find-triangular-sum-of-an-array
2415-count-the-number-of-ideal-arrays
2432-number-of-zero-filled-subarrays
2448-count-number-of-bad-pairs
2610-closest-prime-numbers-in-range
2649-count-total-number-of-colored-cells
2661-smallest-missing-non-negative-integer-after-operations
2704-maximum-difference-by-remapping-a-digit
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
2802-find-the-punishment-number-of-an-integer
2998-count-symmetric-integers
3001-apply-operations-to-maximize-score
3047-find-the-largest-area-of-square-inside-two-rectangles
3172-divisible-and-non-divisible-sums-difference
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3201-distribute-candies-among-children-ii
3243-count-the-number-of-powerful-integers
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3279-alice-and-bob-playing-flower-game
3321-type-of-triangle
3336-water-bottles-ii
3432-count-partitions-with-even-sum-difference
3433-count-mentions-per-user
3462-vowels-game-in-a-string
3512-minimum-operations-to-make-array-sum-divisible-by-k
3548-find-the-count-of-good-integers
3555-final-array-state-after-k-multiplication-operations-i
3577-count-the-number-of-computer-unlocking-permutations
3581-the-two-sneaky-numbers-of-digitville
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations
3676-smallest-number-with-all-set-bits
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3744-minimum-operations-to-make-array-elements-zero
3754-maximum-manhattan-distance-after-k-changes
3768-check-if-digits-are-equal-in-string-after-operations-i
3830-find-closest-person
3851-find-sum-of-array-product-of-magical-sequences

Stack

0020-valid-parentheses
0085-maximal-rectangle
0143-reorder-list
0234-palindrome-linked-list
0780-max-chunks-to-make-sorted
1570-final-prices-with-a-special-discount-in-a-shop
1628-count-submatrices-with-all-ones
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1818-maximum-score-from-removing-substrings
2021-remove-all-occurrences-of-a-substring
2211-count-collisions-on-a-road
2221-check-if-a-parentheses-string-can-be-valid
2307-replace-non-coprime-numbers-in-array
2456-construct-smallest-number-from-di-string
2520-using-a-robot-to-print-the-lexicographically-smallest-string
3001-apply-operations-to-maximize-score
3181-find-building-where-alice-and-bob-can-meet
3445-lexicographically-minimum-string-after-removing-stars
3447-clear-digits
3834-minimum-operations-to-convert-all-elements-to-zero

Monotonic Stack

0085-maximal-rectangle
0780-max-chunks-to-make-sorted
1570-final-prices-with-a-special-discount-in-a-shop
1628-count-submatrices-with-all-ones
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
3001-apply-operations-to-maximize-score
3181-find-building-where-alice-and-bob-can-meet
3834-minimum-operations-to-convert-all-elements-to-zero

Tree

0110-balanced-binary-tree
0222-count-complete-tree-nodes
0515-find-largest-value-in-each-tree-row
0865-smallest-subtree-with-all-the-deepest-nodes
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0975-range-sum-of-bst
1093-recover-a-tree-from-preorder-traversal
1161-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1339-maximum-product-of-splitted-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
2400-minimum-score-after-removals-on-a-tree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2564-most-profitable-path-in-a-tree
2872-maximum-number-of-k-divisible-components
3058-maximum-number-of-k-divisible-components
3307-find-the-maximum-sum-of-node-values
3439-find-minimum-diameter-after-merging-two-trees
3562-maximum-profit-from-trading-stocks-with-discounts
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Binary Tree

0110-balanced-binary-tree
0222-count-complete-tree-nodes
0515-find-largest-value-in-each-tree-row
0865-smallest-subtree-with-all-the-deepest-nodes
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0975-range-sum-of-bst
1093-recover-a-tree-from-preorder-traversal
1161-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1339-maximum-product-of-splitted-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level

Binary Indexed Tree

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

Segment Tree

2280-count-good-triplets-in-an-array
3181-find-building-where-alice-and-bob-can-meet
3454-separate-squares-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Backtracking

0037-sudoku-solver
0401-binary-watch
0494-target-sum
0679-24-game
0756-pyramid-transition-matrix
1160-letter-tile-possibilities
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1819-construct-the-lexicographically-largest-valid-sequence
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
2802-find-the-punishment-number-of-an-integer

Bit Manipulation

0222-count-complete-tree-nodes
0231-power-of-two
0342-power-of-four
0401-binary-watch
0756-pyramid-transition-matrix
0868-binary-gap
0934-bitwise-ors-of-subarrays
1018-binary-prefix-divisible-by-5
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
2400-minimum-score-after-removals-on-a-tree
2478-longest-nice-subarray
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2509-minimize-xor
2529-range-product-queries-of-powers
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
2837-minimum-operations-to-make-the-integer-zero
3233-maximize-the-number-of-partitions-after-operations
3307-find-the-maximum-sum-of-node-values
3314-construct-the-minimum-bitwise-array-i
3315-construct-the-minimum-bitwise-array-ii
3348-minimum-cost-walk-in-weighted-graph
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3676-smallest-number-with-all-set-bits
3744-minimum-operations-to-make-array-elements-zero
3851-find-sum-of-array-product-of-magical-sequences

Trie

0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
1350-remove-sub-folders-from-the-filesystem
2079-delete-duplicate-folders-in-system
3309-count-prefix-and-suffix-pairs-i

Rolling Hash

3309-count-prefix-and-suffix-pairs-i

Hash Function

2079-delete-duplicate-folders-in-system
3309-count-prefix-and-suffix-pairs-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
3577-count-the-number-of-computer-unlocking-permutations

Union Find

0200-number-of-islands
0684-redundant-connection
0794-swim-in-rising-water
0854-making-a-large-island
1058-lexicographically-smallest-equivalent-string
1396-count-servers-that-communicate
1970-last-day-where-you-can-still-cross
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
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
3348-minimum-cost-walk-in-weighted-graph
3863-power-grid-maintenance

Topological Sort

0820-find-eventual-safe-states
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

Design

1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers
1995-finding-pairs-with-a-certain-sum
2023-design-movie-rental-system
2169-simple-bank-system
2429-design-a-food-rating-system
2434-design-a-number-container-system
3678-design-task-manager
3797-design-spreadsheet
3827-implement-router

Data Stream

1477-product-of-the-last-k-numbers

Divide and Conquer

0925-construct-binary-tree-from-preorder-and-postorder-traversal
2280-count-good-triplets-in-an-array

Number Theory

1372-check-if-it-is-a-good-array
2307-replace-non-coprime-numbers-in-array
2415-count-the-number-of-ideal-arrays
2610-closest-prime-numbers-in-range
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
3001-apply-operations-to-maximize-score
3768-check-if-digits-are-equal-in-string-after-operations-i

Combinatorics

1461-count-all-valid-pickup-and-delivery-options
1993-sum-of-all-subset-xor-totals
2324-find-triangular-sum-of-an-array
2415-count-the-number-of-ideal-arrays
3201-distribute-candies-among-children-ii
3548-find-the-count-of-good-integers
3577-count-the-number-of-computer-unlocking-permutations
3637-count-number-of-balanced-permutations
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3768-check-if-digits-are-equal-in-string-after-operations-i
3851-find-sum-of-array-product-of-magical-sequences

Enumeration

0900-reordered-power-of-2
1656-count-good-triplets
1747-lexicographically-smallest-string-after-applying-operations
1925-count-square-sum-triples
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
2202-sum-of-k-mirror-numbers
2215-finding-3-digit-even-numbers
2837-minimum-operations-to-make-the-integer-zero
2975-maximum-square-area-by-removing-fences-from-a-field
2998-count-symmetric-integers
3201-distribute-candies-among-children-ii
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3459-find-the-minimum-area-to-cover-all-ones-ii
3479-count-the-number-of-substrings-with-dominant-ones
3548-find-the-count-of-good-integers
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
3789-maximize-subarrays-after-removing-one-conflicting-pair

Recursion

0021-merge-two-sorted-lists
0143-reorder-list
0231-power-of-two
0234-palindrome-linked-list
0326-power-of-three
0342-power-of-four
2050-count-good-numbers
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Merge Sort

2280-count-good-triplets-in-an-array

Memoization

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
3733-length-of-longest-v-shaped-diagonal-segment

Game Theory

0909-stone-game
3462-vowels-game-in-a-string

Linked List

0021-merge-two-sorted-lists
0086-partition-list
0092-reverse-linked-list-ii
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
3501-delete-nodes-from-linked-list-present-in-array
3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii

Binary Search Tree

0975-range-sum-of-bst

Probability and Statistics

0826-soup-servings
0867-new-21-game

Geometry

0830-largest-triangle-area
1266-minimum-time-visiting-all-points
3047-find-the-largest-area-of-square-inside-two-rectangles
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii

Bitmask

3233-maximize-the-number-of-partitions-after-operations
3851-find-sum-of-array-product-of-magical-sequences

Line Sweep

3454-separate-squares-ii

Doubly-Linked List

3507-minimum-pair-removal-to-sort-array-i
3510-minimum-pair-removal-to-sort-array-ii

Graph Theory

3650-minimum-cost-path-with-edge-reversals

About

Follow our daily problem-solving journey. Contribute alternative solutions or suggestions. Collaborate, learn, and improve as a community

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages