Skip to content

RAJ8664/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

#Leetcode Profile https://leetcode.com/u/RkRoy/

Leetcode Stats

Alt

Leetcode Solutions

LeetCode Topics

Tree

0104-maximum-depth-of-binary-tree
0173-binary-search-tree-iterator
0297-serialize-and-deserialize-binary-tree
0331-verify-preorder-serialization-of-a-binary-tree
0337-house-robber-iii
0449-serialize-and-deserialize-bst
0669-trim-a-binary-search-tree
0988-flip-equivalent-binary-trees
1040-maximum-binary-tree-ii
1093-recover-a-tree-from-preorder-traversal
1450-delete-leaves-with-a-given-value
1653-number-of-good-leaf-nodes-pairs
2131-smallest-missing-genetic-value-in-each-subtree
2545-height-of-binary-tree-after-subtree-removal-queries
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2568-minimum-fuel-cost-to-report-to-the-capital
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

Depth-First Search

0104-maximum-depth-of-binary-tree
0297-serialize-and-deserialize-binary-tree
0310-minimum-height-trees
0337-house-robber-iii
0386-lexicographical-numbers
0417-pacific-atlantic-water-flow
0449-serialize-and-deserialize-bst
0669-trim-a-binary-search-tree
0988-flip-equivalent-binary-trees
1093-recover-a-tree-from-preorder-traversal
1350-remove-sub-folders-from-the-filesystem
1450-delete-leaves-with-a-given-value
1653-number-of-good-leaf-nodes-pairs
2131-smallest-missing-genetic-value-in-each-subtree
2201-valid-arrangement-of-pairs
2545-height-of-binary-tree-after-subtree-removal-queries
2568-minimum-fuel-cost-to-report-to-the-capital
2677-cousins-in-binary-tree-ii
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Binary Tree

0104-maximum-depth-of-binary-tree
0173-binary-search-tree-iterator
0297-serialize-and-deserialize-binary-tree
0331-verify-preorder-serialization-of-a-binary-tree
0337-house-robber-iii
0449-serialize-and-deserialize-bst
0669-trim-a-binary-search-tree
0988-flip-equivalent-binary-trees
1040-maximum-binary-tree-ii
1093-recover-a-tree-from-preorder-traversal
1450-delete-leaves-with-a-given-value
1653-number-of-good-leaf-nodes-pairs
2545-height-of-binary-tree-after-subtree-removal-queries
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Array

0051-n-queens
0179-largest-number
0218-the-skyline-problem
0239-sliding-window-maximum
0324-wiggle-sort-ii
0327-count-of-range-sum
0376-wiggle-subsequence
0384-shuffle-an-array
0396-rotate-function
0413-arithmetic-slices
0417-pacific-atlantic-water-flow
0453-minimum-moves-to-equal-array-elements
0454-4sum-ii
0462-minimum-moves-to-equal-array-elements-ii
0474-ones-and-zeroes
0480-sliding-window-median
0494-target-sum
0526-beautiful-arrangement
0539-minimum-time-difference
0689-maximum-sum-of-3-non-overlapping-subarrays
0698-partition-to-k-equal-sum-subsets
0713-subarray-product-less-than-k
0729-my-calendar-i
0731-my-calendar-ii
0739-daily-temperatures
0746-prefix-and-suffix-search
0759-set-intersection-size-at-least-two
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0831-largest-sum-of-averages
0835-linked-list-components
0852-friends-of-appropriate-ages
0859-design-circular-deque
0860-design-circular-queue
0892-shortest-subarray-with-sum-at-least-k
0901-advantage-shuffle
0905-length-of-longest-fibonacci-subsequence
0912-random-pick-with-weight
0946-smallest-range-ii
0959-3sum-with-multiplicity
0989-largest-component-size-by-common-factor
1020-longest-turbulent-subarray
1025-minimum-cost-for-tickets
1028-interval-list-intersections
1032-satisfiability-of-equality-equations
1063-best-sightseeing-pair
1072-next-greater-node-in-linked-list
1096-maximum-sum-of-two-non-overlapping-subarrays
1140-distant-barcodes
1147-flip-columns-for-maximum-number-of-equal-rows
1219-longest-well-performing-interval
1256-rank-transform-of-an-array
1311-largest-magic-square
1331-path-with-maximum-gold
1342-queens-that-can-attack-the-king
1350-remove-sub-folders-from-the-filesystem
1402-count-square-submatrices-with-all-ones
1436-get-watched-videos-by-your-friends
1468-check-if-n-and-its-double-exist
1497-design-a-stack-with-increment-operation
1538-maximum-points-you-can-obtain-from-cards
1570-final-prices-with-a-special-discount-in-a-shop
1628-count-submatrices-with-all-ones
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1694-make-sum-divisible-by-p
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1755-defuse-the-bomb
1766-minimum-number-of-removals-to-make-mountain-array
1767-design-front-middle-back-queue
1772-create-sorted-array-through-instructions
1798-max-number-of-k-sum-pairs
1813-maximum-erasure-value
1886-minimum-limit-of-balls-in-a-bag
1917-maximum-average-pass-ratio
1923-sentence-similarity-iii
1940-maximum-xor-for-each-query
1946-minimum-absolute-sum-difference
1966-frequency-of-the-most-frequent-element
1972-rotating-the-box
2054-the-number-of-the-smallest-unoccupied-chair
2089-maximum-matrix-sum
2164-two-best-non-overlapping-events
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2180-maximum-number-of-tasks-you-can-assign
2188-minimized-maximum-of-products-distributed-to-any-store
2232-adding-spaces-to-a-string
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2374-steps-to-make-array-non-decreasing
2375-minimum-obstacle-removal-to-reach-corner
2388-replace-elements-in-an-array
2449-maximum-number-of-robots-within-budget
2494-sum-of-prefix-scores-of-strings
2513-number-of-pairs-satisfying-inequality
2545-height-of-binary-tree-after-subtree-removal-queries
2552-maximum-sum-of-distinct-subarrays-with-length-k
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
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
2711-minimum-time-to-visit-a-cell-in-a-grid
2716-prime-subtraction-operation
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
2839-maximum-sum-queries
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3000-minimum-absolute-difference-between-elements-with-constraint
3181-find-building-where-alice-and-bob-can-meet
3291-find-if-array-can-be-sorted
3329-find-the-length-of-the-longest-common-prefix
3380-shortest-subarray-with-or-at-least-k-ii
3427-special-array-ii
3466-number-of-subarrays-with-and-value-of-k
3555-final-array-state-after-k-multiplication-operations-i
3592-find-x-sum-of-all-k-long-subarrays-ii
3651-transformed-array
3653-maximum-subarray-sum-with-length-divisible-by-k

Breadth-First Search

0104-maximum-depth-of-binary-tree
0297-serialize-and-deserialize-binary-tree
0310-minimum-height-trees
0417-pacific-atlantic-water-flow
0449-serialize-and-deserialize-bst
1436-get-watched-videos-by-your-friends
2375-minimum-obstacle-removal-to-reach-corner
2545-height-of-binary-tree-after-subtree-removal-queries
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2568-minimum-fuel-cost-to-report-to-the-capital
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
2711-minimum-time-to-visit-a-cell-in-a-grid
3239-minimum-number-of-operations-to-make-x-and-y-equal
3439-find-minimum-diameter-after-merging-two-trees

Math

0223-rectangle-area
0241-different-ways-to-add-parentheses
0282-expression-add-operators
0372-super-pow
0384-shuffle-an-array
0396-rotate-function
0453-minimum-moves-to-equal-array-elements
0462-minimum-moves-to-equal-array-elements-ii
0539-minimum-time-difference
0670-maximum-swap
0755-reach-a-number
0900-reordered-power-of-2
0912-random-pick-with-weight
0946-smallest-range-ii
0989-largest-component-size-by-common-factor
1048-clumsy-factorial
1295-minimum-garden-perimeter-to-collect-enough-apples
1585-the-kth-factor-of-n
2716-prime-subtraction-operation
2871-double-a-number-represented-as-a-linked-list
3555-final-array-state-after-k-multiplication-operations-i

String

0010-regular-expression-matching
0030-substring-with-concatenation-of-all-words
0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0282-expression-add-operators
0297-serialize-and-deserialize-binary-tree
0331-verify-preorder-serialization-of-a-binary-tree
0345-reverse-vowels-of-a-string
0394-decode-string
0424-longest-repeating-character-replacement
0449-serialize-and-deserialize-bst
0474-ones-and-zeroes
0539-minimum-time-difference
0567-permutation-in-string
0677-map-sum-pairs
0746-prefix-and-suffix-search
0812-rotate-string
0855-count-unique-characters-of-all-substrings-of-a-given-string
0920-uncommon-words-from-two-sentences
1023-time-based-key-value-store
1032-satisfiability-of-equality-equations
1093-recover-a-tree-from-preorder-traversal
1159-smallest-subsequence-of-distinct-characters
1197-parsing-a-boolean-expression
1261-swap-for-longest-repeated-character-substring
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1350-remove-sub-folders-from-the-filesystem
1351-replace-the-substring-for-balanced-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1667-find-kth-bit-in-nth-binary-string
1715-split-a-string-into-the-max-number-of-unique-substrings
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2300-construct-string-with-repeat-limit
2389-design-a-text-editor
2414-move-pieces-to-obtain-a-string
2494-sum-of-prefix-scores-of-strings
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
3018-make-string-a-subsequence-using-cyclic-increments
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3195-separate-black-and-white-balls
3267-find-longest-special-substring-that-occurs-thrice-i
3329-find-the-length-of-the-longest-common-prefix
3451-string-compression-iii

Sorting

0179-largest-number
0324-wiggle-sort-ii
0462-minimum-moves-to-equal-array-elements-ii
0539-minimum-time-difference
0759-set-intersection-size-at-least-two
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0852-friends-of-appropriate-ages
0900-reordered-power-of-2
0901-advantage-shuffle
0946-smallest-range-ii
0959-3sum-with-multiplicity
1140-distant-barcodes
1256-rank-transform-of-an-array
1436-get-watched-videos-by-your-friends
1468-check-if-n-and-its-double-exist
1798-max-number-of-k-sum-pairs
1946-minimum-absolute-sum-difference
1966-frequency-of-the-most-frequent-element
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2180-maximum-number-of-tasks-you-can-assign
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2640-maximum-number-of-integers-to-choose-from-a-range-i
2646-kth-largest-sum-in-a-binary-tree
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2839-maximum-sum-queries
2891-maximum-beauty-of-an-array-after-applying-operation
3291-find-if-array-can-be-sorted

Design

0173-binary-search-tree-iterator
0297-serialize-and-deserialize-binary-tree
0432-all-oone-data-structure
0449-serialize-and-deserialize-bst
0677-map-sum-pairs
0729-my-calendar-i
0731-my-calendar-ii
0746-prefix-and-suffix-search
0838-design-linked-list
0859-design-circular-deque
0860-design-circular-queue
0969-number-of-recent-calls
1023-time-based-key-value-store
1337-design-skiplist
1497-design-a-stack-with-increment-operation
1767-design-front-middle-back-queue
1905-design-authentication-manager
1953-finding-mk-average
2389-design-a-text-editor
2512-longest-uploaded-prefix

Binary Search Tree

0173-binary-search-tree-iterator
0327-count-of-range-sum
0449-serialize-and-deserialize-bst
0669-trim-a-binary-search-tree
0729-my-calendar-i
0731-my-calendar-ii
0755-reach-a-number
0852-friends-of-appropriate-ages
0892-shortest-subarray-with-sum-at-least-k
0912-random-pick-with-weight
1023-time-based-key-value-store
1295-minimum-garden-perimeter-to-collect-enough-apples
1468-check-if-n-and-its-double-exist
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1766-minimum-number-of-removals-to-make-mountain-array
1772-create-sorted-array-through-instructions
1886-minimum-limit-of-balls-in-a-bag
1946-minimum-absolute-sum-difference
1966-frequency-of-the-most-frequent-element
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2180-maximum-number-of-tasks-you-can-assign
2188-minimized-maximum-of-products-distributed-to-any-store
2449-maximum-number-of-robots-within-budget
2512-longest-uploaded-prefix
2513-number-of-pairs-satisfying-inequality
2586-longest-square-streak-in-an-array
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
2839-maximum-sum-queries
2891-maximum-beauty-of-an-array-after-applying-operation
3000-minimum-absolute-difference-between-elements-with-constraint
3181-find-building-where-alice-and-bob-can-meet
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii
3466-number-of-subarrays-with-and-value-of-k

Hash Table

0030-substring-with-concatenation-of-all-words
0424-longest-repeating-character-replacement
0432-all-oone-data-structure
0454-4sum-ii
0480-sliding-window-median
0567-permutation-in-string
0677-map-sum-pairs
0746-prefix-and-suffix-search
0835-linked-list-components
0855-count-unique-characters-of-all-substrings-of-a-given-string
0900-reordered-power-of-2
0905-length-of-longest-fibonacci-subsequence
0920-uncommon-words-from-two-sentences
0959-3sum-with-multiplicity
0989-largest-component-size-by-common-factor
1023-time-based-key-value-store
1140-distant-barcodes
1147-flip-columns-for-maximum-number-of-equal-rows
1219-longest-well-performing-interval
1256-rank-transform-of-an-array
1261-swap-for-longest-repeated-character-substring
1436-get-watched-videos-by-your-friends
1468-check-if-n-and-its-double-exist
1694-make-sum-divisible-by-p
1715-split-a-string-into-the-max-number-of-unique-substrings
1798-max-number-of-k-sum-pairs
1813-maximum-erasure-value
1905-design-authentication-manager
2054-the-number-of-the-smallest-unoccupied-chair
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2388-replace-elements-in-an-array
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
2640-maximum-number-of-integers-to-choose-from-a-range-i
2677-cousins-in-binary-tree-ii
2695-find-score-of-an-array-after-marking-all-elements
2755-extra-characters-in-a-string
3267-find-longest-special-substring-that-occurs-thrice-i
3329-find-the-length-of-the-longest-common-prefix
3592-find-x-sum-of-all-k-long-subarrays-ii
3653-maximum-subarray-sum-with-length-divisible-by-k

Trie

0386-lexicographical-numbers
0677-map-sum-pairs
0746-prefix-and-suffix-search
1350-remove-sub-folders-from-the-filesystem
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3329-find-the-length-of-the-longest-common-prefix

Linked List

0025-reverse-nodes-in-k-group
0061-rotate-list
0432-all-oone-data-structure
0835-linked-list-components
0838-design-linked-list
0859-design-circular-deque
0860-design-circular-queue
1072-next-greater-node-in-linked-list
1337-design-skiplist
1767-design-front-middle-back-queue
1905-design-authentication-manager
2374-steps-to-make-array-non-decreasing
2389-design-a-text-editor
2573-remove-nodes-from-linked-list
2871-double-a-number-represented-as-a-linked-list

Queue

0239-sliding-window-maximum
0859-design-circular-deque
0860-design-circular-queue
0892-shortest-subarray-with-sum-at-least-k
0969-number-of-recent-calls
1767-design-front-middle-back-queue
1953-finding-mk-average
2180-maximum-number-of-tasks-you-can-assign
2449-maximum-number-of-robots-within-budget
2868-continuous-subarrays

Counting

0900-reordered-power-of-2
0920-uncommon-words-from-two-sentences
0959-3sum-with-multiplicity
1140-distant-barcodes
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2494-sum-of-prefix-scores-of-strings
3267-find-longest-special-substring-that-occurs-thrice-i

Dynamic Programming

0010-regular-expression-matching
0241-different-ways-to-add-parentheses
0337-house-robber-iii
0376-wiggle-subsequence
0396-rotate-function
0397-integer-replacement
0413-arithmetic-slices
0474-ones-and-zeroes
0494-target-sum
0526-beautiful-arrangement
0689-maximum-sum-of-3-non-overlapping-subarrays
0698-partition-to-k-equal-sum-subsets
0806-domino-and-tromino-tiling
0831-largest-sum-of-averages
0855-count-unique-characters-of-all-substrings-of-a-given-string
0905-length-of-longest-fibonacci-subsequence
1020-longest-turbulent-subarray
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1096-maximum-sum-of-two-non-overlapping-subarrays
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1766-minimum-number-of-removals-to-make-mountain-array
2131-smallest-missing-genetic-value-in-each-subtree
2164-two-best-non-overlapping-events
2554-minimum-total-distance-traveled
2562-count-ways-to-build-good-strings
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
3239-minimum-number-of-operations-to-make-x-and-y-equal

Stack

0173-binary-search-tree-iterator
0331-verify-preorder-serialization-of-a-binary-tree
0394-decode-string
0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
1048-clumsy-factorial
1072-next-greater-node-in-linked-list
1159-smallest-subsequence-of-distinct-characters
1197-parsing-a-boolean-expression
1219-longest-well-performing-interval
1497-design-a-stack-with-increment-operation
1570-final-prices-with-a-special-discount-in-a-shop
1628-count-submatrices-with-all-ones
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2095-minimum-number-of-swaps-to-make-the-string-balanced
2374-steps-to-make-array-non-decreasing
2389-design-a-text-editor
2573-remove-nodes-from-linked-list
2839-maximum-sum-queries
2871-double-a-number-represented-as-a-linked-list
3181-find-building-where-alice-and-bob-can-meet

Matrix

0417-pacific-atlantic-water-flow
1147-flip-columns-for-maximum-number-of-equal-rows
1311-largest-magic-square
1331-path-with-maximum-gold
1342-queens-that-can-attack-the-king
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones
1972-rotating-the-box
2089-maximum-matrix-sum
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid
2794-maximum-number-of-moves-in-a-grid

Monotonic Stack

0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
1072-next-greater-node-in-linked-list
1159-smallest-subsequence-of-distinct-characters
1219-longest-well-performing-interval
1570-final-prices-with-a-special-discount-in-a-shop
1628-count-submatrices-with-all-ones
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2374-steps-to-make-array-non-decreasing
2573-remove-nodes-from-linked-list
2839-maximum-sum-queries
3181-find-building-where-alice-and-bob-can-meet

Simulation

1048-clumsy-factorial
1342-queens-that-can-attack-the-king
1667-find-kth-bit-in-nth-binary-string
2232-adding-spaces-to-a-string
2343-count-unguarded-cells-in-the-grid
2388-replace-elements-in-an-array
2389-design-a-text-editor
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
3555-final-array-state-after-k-multiplication-operations-i
3651-transformed-array

Doubly-Linked List

0432-all-oone-data-structure
1905-design-authentication-manager
2389-design-a-text-editor

Sliding Window

0030-substring-with-concatenation-of-all-words
0239-sliding-window-maximum
0413-arithmetic-slices
0424-longest-repeating-character-replacement
0480-sliding-window-median
0567-permutation-in-string
0713-subarray-product-less-than-k
0892-shortest-subarray-with-sum-at-least-k
1020-longest-turbulent-subarray
1096-maximum-sum-of-two-non-overlapping-subarrays
1261-swap-for-longest-repeated-character-substring
1351-replace-the-substring-for-balanced-string
1538-maximum-points-you-can-obtain-from-cards
1755-defuse-the-bomb
1813-maximum-erasure-value
1966-frequency-of-the-most-frequent-element
2449-maximum-number-of-robots-within-budget
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3267-find-longest-special-substring-that-occurs-thrice-i
3380-shortest-subarray-with-or-at-least-k-ii
3592-find-x-sum-of-all-k-long-subarrays-ii

Iterator

0173-binary-search-tree-iterator

Greedy

0179-largest-number
0324-wiggle-sort-ii
0376-wiggle-subsequence
0397-integer-replacement
0670-maximum-swap
0759-set-intersection-size-at-least-two
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0901-advantage-shuffle
0946-smallest-range-ii
1140-distant-barcodes
1159-smallest-subsequence-of-distinct-characters
1304-longest-happy-string
1766-minimum-number-of-removals-to-make-mountain-array
1917-maximum-average-pass-ratio
1966-frequency-of-the-most-frequent-element
2089-maximum-matrix-sum
2095-minimum-number-of-swaps-to-make-the-string-balanced
2180-maximum-number-of-tasks-you-can-assign
2300-construct-string-with-repeat-limit
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2716-prime-subtraction-operation
3195-separate-black-and-white-balls

Data Stream

0969-number-of-recent-calls
1767-design-front-middle-back-queue
1953-finding-mk-average

Recursion

0010-regular-expression-matching
0025-reverse-nodes-in-k-group
0241-different-ways-to-add-parentheses
0394-decode-string
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string
2573-remove-nodes-from-linked-list

Memoization

0241-different-ways-to-add-parentheses
0397-integer-replacement
0698-partition-to-k-equal-sum-subsets
3239-minimum-number-of-operations-to-make-x-and-y-equal

Rolling Hash

0214-shortest-palindrome

String Matching

0214-shortest-palindrome
0812-rotate-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Hash Function

0214-shortest-palindrome

Two Pointers

0061-rotate-list
0345-reverse-vowels-of-a-string
0567-permutation-in-string
0852-friends-of-appropriate-ages
0901-advantage-shuffle
0959-3sum-with-multiplicity
1028-interval-list-intersections
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
1798-max-number-of-k-sum-pairs
1923-sentence-similarity-iii
1972-rotating-the-box
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2414-move-pieces-to-obtain-a-string
2581-divide-players-into-teams-of-equal-skill
2699-count-the-number-of-fair-pairs
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

Segment Tree

0218-the-skyline-problem
0327-count-of-range-sum
0729-my-calendar-i
0731-my-calendar-ii
1772-create-sorted-array-through-instructions
2512-longest-uploaded-prefix
2513-number-of-pairs-satisfying-inequality
2839-maximum-sum-queries
3181-find-building-where-alice-and-bob-can-meet
3466-number-of-subarrays-with-and-value-of-k

Ordered Set

0218-the-skyline-problem
0327-count-of-range-sum
0729-my-calendar-i
0731-my-calendar-ii
1772-create-sorted-array-through-instructions
1946-minimum-absolute-sum-difference
1953-finding-mk-average
2512-longest-uploaded-prefix
2513-number-of-pairs-satisfying-inequality
2868-continuous-subarrays
3000-minimum-absolute-difference-between-elements-with-constraint

Backtracking

0051-n-queens
0282-expression-add-operators
0494-target-sum
0526-beautiful-arrangement
0698-partition-to-k-equal-sum-subsets
1331-path-with-maximum-gold
1715-split-a-string-into-the-max-number-of-unique-substrings
2170-count-number-of-maximum-bitwise-or-subsets

Prefix Sum

0731-my-calendar-ii
0831-largest-sum-of-averages
0892-shortest-subarray-with-sum-at-least-k
0912-random-pick-with-weight
1219-longest-well-performing-interval
1311-largest-magic-square
1538-maximum-points-you-can-obtain-from-cards
1694-make-sum-divisible-by-p
1940-maximum-xor-for-each-query
1966-frequency-of-the-most-frequent-element
2358-number-of-ways-to-split-array
2449-maximum-number-of-robots-within-budget
2691-count-vowel-strings-in-ranges
3427-special-array-ii
3653-maximum-subarray-sum-with-length-divisible-by-k

Divide and Conquer

0218-the-skyline-problem
0324-wiggle-sort-ii
0327-count-of-range-sum
0372-super-pow
1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Heap (Priority Queue)

0218-the-skyline-problem
0239-sliding-window-maximum
0480-sliding-window-median
0892-shortest-subarray-with-sum-at-least-k
0918-reachable-nodes-in-subdivided-graph
1140-distant-barcodes
1304-longest-happy-string
1917-maximum-average-pass-ratio
1953-finding-mk-average
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
2449-maximum-number-of-robots-within-budget
2512-longest-uploaded-prefix
2616-maximal-score-after-applying-k-operations
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
3555-final-array-state-after-k-multiplication-operations-i
3592-find-x-sum-of-all-k-long-subarrays-ii

Union Find

0989-largest-component-size-by-common-factor
1032-satisfiability-of-equality-equations
2131-smallest-missing-genetic-value-in-each-subtree
2512-longest-uploaded-prefix

Binary Indexed Tree

0218-the-skyline-problem
0327-count-of-range-sum
1772-create-sorted-array-through-instructions
2512-longest-uploaded-prefix
2513-number-of-pairs-satisfying-inequality
2839-maximum-sum-queries
3181-find-building-where-alice-and-bob-can-meet

Geometry

0223-rectangle-area

Randomized

0384-shuffle-an-array
0912-random-pick-with-weight

Bit Manipulation

0397-integer-replacement
0526-beautiful-arrangement
0698-partition-to-k-equal-sum-subsets
1940-maximum-xor-for-each-query
2170-count-number-of-maximum-bitwise-or-subsets
2356-largest-combination-with-bitwise-and-greater-than-zero
3291-find-if-array-can-be-sorted
3380-shortest-subarray-with-or-at-least-k-ii
3394-minimum-array-end
3466-number-of-subarrays-with-and-value-of-k

Enumeration

0900-reordered-power-of-2
2170-count-number-of-maximum-bitwise-or-subsets

Monotonic Queue

0239-sliding-window-maximum
0892-shortest-subarray-with-sum-at-least-k
2180-maximum-number-of-tasks-you-can-assign
2449-maximum-number-of-robots-within-budget
2868-continuous-subarrays

Graph

0310-minimum-height-trees
0918-reachable-nodes-in-subdivided-graph
1032-satisfiability-of-equality-equations
1436-get-watched-videos-by-your-friends
2201-valid-arrangement-of-pairs
2375-minimum-obstacle-removal-to-reach-corner
2568-minimum-fuel-cost-to-report-to-the-capital
2711-minimum-time-to-visit-a-cell-in-a-grid
3189-find-champion-ii
3439-find-minimum-diameter-after-merging-two-trees

Topological Sort

0310-minimum-height-trees

Shortest Path

0918-reachable-nodes-in-subdivided-graph
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid

Number Theory

0989-largest-component-size-by-common-factor
1585-the-kth-factor-of-n
2716-prime-subtraction-operation

Bitmask

0526-beautiful-arrangement
0698-partition-to-k-equal-sum-subsets

Merge Sort

0327-count-of-range-sum
1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Database

0177-nth-highest-salary
0577-employee-bonus
1801-average-time-of-process-per-machine
1811-fix-names-in-a-table

Eulerian Circuit

2201-valid-arrangement-of-pairs

Line Sweep

0218-the-skyline-problem

Quickselect

0324-wiggle-sort-ii

About

Leetcode Solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published