Skip to content

kkavyaGoyal2003/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

A collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

LeetCode Topics

Array

0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0039-combination-sum
0042-trapping-rain-water
0045-jump-game-ii
0048-rotate-image
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0059-spiral-matrix-ii
0066-plus-one
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0080-remove-duplicates-from-sorted-array-ii
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0130-surrounded-regions
0135-candy
0136-single-number
0150-evaluate-reverse-polish-notation
0153-find-minimum-in-rotated-sorted-array
0164-maximum-gap
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0219-contains-duplicate-ii
0221-maximal-square
0228-summary-ranges
0238-product-of-array-except-self
0260-single-number-iii
0268-missing-number
0274-h-index
0275-h-index-ii
0284-peeking-iterator
0287-find-the-duplicate-number
0289-game-of-life
0322-coin-change
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0378-kth-smallest-element-in-a-sorted-matrix
0406-queue-reconstruction-by-height
0414-third-maximum-number
0417-pacific-atlantic-water-flow
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0473-matchsticks-to-square
0496-next-greater-element-i
0498-diagonal-traverse
0503-next-greater-element-ii
0506-relative-ranks
0518-coin-change-ii
0525-contiguous-array
0526-beautiful-arrangement
0529-minesweeper
0532-k-diff-pairs-in-an-array
0542-01-matrix
0561-array-partition
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0621-task-scheduler
0628-maximum-product-of-three-numbers
0636-exclusive-time-of-functions
0643-maximum-average-subarray-i
0645-set-mismatch
0648-replace-words
0654-maximum-binary-tree
0658-find-k-closest-elements
0682-baseball-game
0690-employee-importance
0713-subarray-product-less-than-k
0720-longest-word-in-dictionary
0733-flood-fill
0735-asteroid-collision
0739-daily-temperatures
0740-delete-and-earn
0745-find-smallest-letter-greater-than-target
0747-min-cost-climbing-stairs
0748-largest-number-at-least-twice-of-others
0780-max-chunks-to-make-sorted
0816-design-hashset
0817-design-hashmap
0822-unique-morse-code-words
0830-largest-triangle-area
0861-flipping-an-image
0862-find-and-replace-in-string
0882-peak-index-in-a-mountain-array
0898-transpose-matrix
0940-fruit-into-baskets
0941-sort-array-by-parity
0943-sum-of-subarray-minimums
0944-smallest-range-i
0958-sort-array-by-parity-ii
0961-n-repeated-element-in-size-2n-array
0966-binary-subarrays-with-sum
0967-minimum-falling-path-sum
0974-reorder-data-in-log-files
0987-reveal-cards-in-increasing-order
0990-verifying-an-alien-dictionary
1002-find-common-characters
1019-squares-of-a-sorted-array
1034-subarrays-with-k-different-integers
1036-rotting-oranges
1039-find-the-town-judge
1046-max-consecutive-ones-iii
1047-maximize-sum-of-array-after-k-negations
1049-minimum-domino-rotations-for-equal-row
1072-next-greater-node-in-linked-list
1121-partition-array-for-maximum-sum
1210-mean-of-array-after-removing-some-elements
1232-sum-of-mutated-array-closest-to-target
1241-decompress-run-length-encoded-list
1253-sort-the-matrix-diagonally
1293-three-consecutive-odds
1306-minimum-absolute-difference
1310-watering-plants
1351-count-negative-numbers-in-a-sorted-matrix
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1370-count-number-of-nice-subarrays
1378-cells-with-odd-values-in-a-matrix
1382-calculate-amount-paid-in-taxes
1390-four-divisors
1392-find-the-difference-of-two-arrays
1407-group-the-people-given-the-group-size-they-belong-to
1463-the-k-weakest-rows-in-a-matrix
1464-reduce-array-size-to-the-half
1486-find-the-distance-value-between-two-arrays
1496-lucky-numbers-in-a-matrix
1524-string-matching-in-an-array
1538-maximum-points-you-can-obtain-from-cards
1547-destination-city
1570-final-prices-with-a-special-discount-in-a-shop
1651-shuffle-string
1675-magnetic-force-between-two-balls
1677-matrix-diagonal-sum
1683-maximum-number-of-coins-you-can-get
1693-sum-of-all-odd-length-subarrays
1711-find-valid-matrix-given-row-and-column-sums
1730-special-array-with-x-elements-greater-than-or-equal-x
1741-sort-array-by-increasing-frequency
1742-widest-vertical-area-between-two-points-containing-no-points
1752-arithmetic-subarrays
1755-defuse-the-bomb
1781-check-if-two-string-arrays-are-equivalent
1786-count-the-number-of-consistent-strings
1802-number-of-students-unable-to-eat-lunch
1829-maximum-units-on-a-truck
1839-decode-xored-array
1878-check-if-array-is-sorted-and-rotated
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1899-count-items-matching-a-rule
1927-maximum-ascending-subarray-sum
1938-minimum-operations-to-make-the-array-increasing
1944-truncate-sentence
1945-finding-the-users-active-minutes
1951-find-the-winner-of-the-circular-game
2015-determine-whether-matrix-can-be-obtained-by-rotation
2016-reduction-operations-to-make-the-array-elements-equal
2042-maximum-product-difference-between-two-pairs
2047-find-a-peak-element-ii
2099-number-of-strings-that-appear-as-substrings-in-word
2107-find-unique-binary-string
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2123-the-number-of-weak-characters-in-the-game
2163-kth-distinct-string-in-an-array
2195-time-needed-to-buy-tickets
2219-maximum-number-of-words-found-in-sentences
2227-sum-of-subarray-ranges
2231-find-first-palindromic-string-in-the-array
2248-minimum-cost-of-buying-candies-with-discount
2265-partition-array-according-to-given-pivot
2269-count-elements-with-strictly-smaller-and-greater-elements
2274-keep-multiplying-found-values-by-two
2292-counting-words-with-a-given-prefix
2306-create-binary-tree-from-descriptions
2308-divide-array-into-equal-pairs
2324-find-triangular-sum-of-an-array
2331-intersection-of-multiple-arrays
2343-count-unguarded-cells-in-the-grid
2392-successful-pairs-of-spells-and-potions
2411-spiral-matrix-iv
2421-maximum-number-of-pairs-in-array
2432-number-of-zero-filled-subarrays
2436-make-array-zero-by-subtracting-equal-amounts
2447-merge-similar-items
2454-largest-local-values-in-a-matrix
2471-minimum-amount-of-time-to-collect-garbage
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2519-find-the-original-array-of-prefix-xor
2524-largest-positive-integer-that-exists-with-its-negative
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2585-delete-greatest-value-in-each-row
2606-difference-between-ones-and-zeros-in-row-and-column
2614-maximum-count-of-positive-integer-and-negative-integer
2631-sort-the-students-by-their-kth-score
2634-minimum-common-value
2639-separate-the-digits-in-an-array
2661-smallest-missing-non-negative-integer-after-operations
2685-first-completely-painted-row-or-column
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2724-convert-an-array-into-a-2d-array-with-conditions
2727-number-of-senior-citizens
2737-row-with-maximum-ones
2756-buy-two-chocolates
2766-find-the-prefix-common-array-of-two-arrays
2836-neither-minimum-nor-maximum
2847-find-maximum-number-of-string-pairs
2866-longest-even-odd-subarray-with-threshold
2917-count-pairs-whose-sum-is-less-than-target
2977-check-if-a-string-is-an-acronym-of-words
3075-maximize-happiness-of-selected-children
3093-sum-of-values-at-indices-with-k-set-bits
3193-maximum-strong-pair-xor-i
3227-find-missing-and-repeated-values
3236-smallest-missing-integer-greater-than-sequential-prefix-sum
3241-divide-array-into-arrays-with-max-difference
3242-count-elements-with-maximum-frequency
3251-maximum-area-of-longest-diagonal-rectangle
3309-count-prefix-and-suffix-pairs-i
3311-ant-on-the-boundary
3330-modify-the-matrix
3334-apple-redistribution-into-boxes
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3397-find-the-integer-added-to-array-i
3428-find-the-xor-of-numbers-which-appear-twice
3429-special-array-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3501-delete-nodes-from-linked-list-present-in-array
3533-snake-in-matrix
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3668-restore-finishing-order
3685-count-subarrays-of-length-three-with-a-condition
3691-minimum-operations-to-make-columns-strictly-increasing
3704-count-partitions-with-even-sum-difference
3731-sum-of-variable-length-subarrays
3731-find-missing-elements
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3778-transform-array-by-parity
3790-fruits-into-baskets-ii
3832-minimum-cost-to-reach-every-position

Hash Table

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0017-letter-combinations-of-a-phone-number
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0133-clone-graph
0142-linked-list-cycle-ii
0146-lru-cache
0160-intersection-of-two-linked-lists
0187-repeated-dna-sequences
0202-happy-number
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0264-ugly-number-ii
0268-missing-number
0290-word-pattern
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0383-ransom-note
0387-first-unique-character-in-a-string
0409-longest-palindrome
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0448-find-all-numbers-disappeared-in-an-array
0460-lfu-cache
0496-next-greater-element-i
0525-contiguous-array
0532-k-diff-pairs-in-an-array
0594-longest-harmonious-subsequence
0621-task-scheduler
0645-set-mismatch
0648-replace-words
0653-two-sum-iv-input-is-a-bst
0690-employee-importance
0720-longest-word-in-dictionary
0740-delete-and-earn
0768-partition-labels
0782-jewels-and-stones
0807-custom-sort-string
0816-design-hashset
0817-design-hashmap
0822-unique-morse-code-words
0862-find-and-replace-in-string
0940-fruit-into-baskets
0961-n-repeated-element-in-size-2n-array
0966-binary-subarrays-with-sum
0990-verifying-an-alien-dictionary
1002-find-common-characters
1034-subarrays-with-k-different-integers
1039-find-the-town-judge
1160-letter-tile-possibilities
1264-maximum-number-of-words-you-can-type
1297-maximum-number-of-balloons
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1370-count-number-of-nice-subarrays
1392-find-the-difference-of-two-arrays
1407-group-the-people-given-the-group-size-they-belong-to
1460-number-of-substrings-containing-all-three-characters
1464-reduce-array-size-to-the-half
1469-minimum-number-of-steps-to-make-two-strings-anagram
1500-count-largest-group
1547-destination-city
1741-sort-array-by-increasing-frequency
1752-arithmetic-subarrays
1786-count-the-number-of-consistent-strings
1945-finding-the-users-active-minutes
2053-check-if-all-characters-have-equal-number-of-occurrences
2107-find-unique-binary-string
2163-kth-distinct-string-in-an-array
2274-keep-multiplying-found-values-by-two
2306-create-binary-tree-from-descriptions
2308-divide-array-into-equal-pairs
2331-intersection-of-multiple-arrays
2406-decode-the-message
2421-maximum-number-of-pairs-in-array
2436-make-array-zero-by-subtracting-equal-amounts
2447-merge-similar-items
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2634-minimum-common-value
2661-smallest-missing-non-negative-integer-after-operations
2685-first-completely-painted-row-or-column
2707-merge-two-2d-arrays-by-summing-values
2724-convert-an-array-into-a-2d-array-with-conditions
2766-find-the-prefix-common-array-of-two-arrays
2847-find-maximum-number-of-string-pairs
3193-maximum-strong-pair-xor-i
3227-find-missing-and-repeated-values
3236-smallest-missing-integer-greater-than-sequential-prefix-sum
3242-count-elements-with-maximum-frequency
3349-maximum-length-substring-with-two-occurrences
3412-permutation-difference-between-two-strings
3428-find-the-xor-of-numbers-which-appear-twice
3501-delete-nodes-from-linked-list-present-in-array
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3668-restore-finishing-order
3731-find-missing-elements
3872-find-most-frequent-vowel-and-consonant

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0148-sort-list
0164-maximum-gap
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0274-h-index
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0378-kth-smallest-element-in-a-sorted-matrix
0406-queue-reconstruction-by-height
0414-third-maximum-number
0455-assign-cookies
0506-relative-ranks
0532-k-diff-pairs-in-an-array
0561-array-partition
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0621-task-scheduler
0628-maximum-product-of-three-numbers
0645-set-mismatch
0658-find-k-closest-elements
0720-longest-word-in-dictionary
0748-largest-number-at-least-twice-of-others
0780-max-chunks-to-make-sorted
0807-custom-sort-string
0862-find-and-replace-in-string
0941-sort-array-by-parity
0958-sort-array-by-parity-ii
0974-reorder-data-in-log-files
0987-reveal-cards-in-increasing-order
1019-squares-of-a-sorted-array
1047-maximize-sum-of-array-after-k-negations
1210-mean-of-array-after-removing-some-elements
1232-sum-of-mutated-array-closest-to-target
1253-sort-the-matrix-diagonally
1306-minimum-absolute-difference
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1427-all-elements-in-two-binary-search-trees
1463-the-k-weakest-rows-in-a-matrix
1464-reduce-array-size-to-the-half
1486-find-the-distance-value-between-two-arrays
1675-magnetic-force-between-two-balls
1683-maximum-number-of-coins-you-can-get
1730-special-array-with-x-elements-greater-than-or-equal-x
1741-sort-array-by-increasing-frequency
1742-widest-vertical-area-between-two-points-containing-no-points
1752-arithmetic-subarrays
1829-maximum-units-on-a-truck
1970-sorting-the-sentence
2016-reduction-operations-to-make-the-array-elements-equal
2042-maximum-product-difference-between-two-pairs
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2123-the-number-of-weak-characters-in-the-game
2248-minimum-cost-of-buying-candies-with-discount
2269-count-elements-with-strictly-smaller-and-greater-elements
2274-keep-multiplying-found-values-by-two
2331-intersection-of-multiple-arrays
2392-successful-pairs-of-spells-and-potions
2436-make-array-zero-by-subtracting-equal-amounts
2447-merge-similar-items
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2585-delete-greatest-value-in-each-row
2631-sort-the-students-by-their-kth-score
2699-count-the-number-of-fair-pairs
2756-buy-two-chocolates
2836-neither-minimum-nor-maximum
2917-count-pairs-whose-sum-is-less-than-target
3075-maximize-happiness-of-selected-children
3236-smallest-missing-integer-greater-than-sequential-prefix-sum
3241-divide-array-into-arrays-with-max-difference
3334-apple-redistribution-into-boxes
3731-find-missing-elements
3778-transform-array-by-parity

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0008-string-to-integer-atoi
0012-integer-to-roman
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0044-wildcard-matching
0049-group-anagrams
0058-length-of-last-word
0072-edit-distance
0076-minimum-window-substring
0079-word-search
0125-valid-palindrome
0131-palindrome-partitioning
0151-reverse-words-in-a-string
0187-repeated-dna-sequences
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0227-basic-calculator-ii
0242-valid-anagram
0257-binary-tree-paths
0273-integer-to-english-words
0282-expression-add-operators
0290-word-pattern
0297-serialize-and-deserialize-binary-tree
0301-remove-invalid-parentheses
0344-reverse-string
0383-ransom-note
0387-first-unique-character-in-a-string
0392-is-subsequence
0394-decode-string
0402-remove-k-digits
0409-longest-palindrome
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0504-base-7
0557-reverse-words-in-a-string-iii
0648-replace-words
0657-robot-return-to-origin
0720-longest-word-in-dictionary
0768-partition-labels
0782-jewels-and-stones
0807-custom-sort-string
0812-rotate-string
0822-unique-morse-code-words
0862-find-and-replace-in-string
0886-score-of-parentheses
0974-reorder-data-in-log-files
0990-verifying-an-alien-dictionary
1002-find-common-characters
1078-remove-outermost-parentheses
1119-robot-bounded-in-circle
1128-remove-all-adjacent-duplicates-in-string
1160-letter-tile-possibilities
1264-maximum-number-of-words-you-can-type
1297-maximum-number-of-balloons
1320-remove-all-adjacent-duplicates-in-string-ii
1341-split-a-string-in-balanced-strings
1353-find-resultant-array-after-removing-anagrams
1430-find-the-k-beauty-of-a-number
1454-remove-palindromic-subsequences
1460-number-of-substrings-containing-all-three-characters
1469-minimum-number-of-steps-to-make-two-strings-anagram
1524-string-matching-in-an-array
1547-destination-city
1651-shuffle-string
1666-make-the-string-great
1737-maximum-nesting-depth-of-the-parentheses
1781-check-if-two-string-arrays-are-equivalent
1786-count-the-number-of-consistent-strings
1797-goal-parser-interpretation
1894-merge-strings-alternately
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1899-count-items-matching-a-rule
1944-truncate-sentence
1954-replace-all-digits-with-characters
1970-sorting-the-sentence
2032-largest-odd-number-in-string
2053-check-if-all-characters-have-equal-number-of-occurrences
2099-number-of-strings-that-appear-as-substrings-in-word
2107-find-unique-binary-string
2128-reverse-prefix-of-word
2134-maximize-the-confusion-of-an-exam
2163-kth-distinct-string-in-an-array
2219-maximum-number-of-words-found-in-sentences
2231-find-first-palindromic-string-in-the-array
2292-counting-words-with-a-given-prefix
2346-largest-3-same-digit-number-in-string
2406-decode-the-message
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2471-minimum-amount-of-time-to-collect-garbage
2483-minimum-penalty-for-a-shop
2502-sort-the-people
2727-number-of-senior-citizens
2847-find-maximum-number-of-string-pairs
2977-check-if-a-string-is-an-acronym-of-words
3055-maximum-odd-binary-number
3309-count-prefix-and-suffix-pairs-i
3349-maximum-length-substring-with-two-occurrences
3412-permutation-difference-between-two-strings
3426-minimum-number-of-chairs-in-a-waiting-room
3447-clear-digits
3533-snake-in-matrix
3567-convert-date-to-binary
3617-find-the-original-typed-string-i
3636-check-balanced-string
3768-check-if-digits-are-equal-in-string-after-operations-i
3811-reverse-degree-of-a-string
3872-find-most-frequent-vowel-and-consonant

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0572-subtree-of-another-tree
0812-rotate-string
1524-string-matching-in-an-array
2292-counting-words-with-a-given-prefix
3309-count-prefix-and-suffix-pairs-i

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0341-flatten-nested-list-iterator
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0671-second-minimum-node-in-a-binary-tree
0690-employee-importance
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0799-minimum-distance-between-bst-nodes
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
1005-univalued-binary-tree
1021-distribute-coins-in-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1114-binary-search-tree-to-greater-sum-tree
1161-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1285-balance-a-binary-search-tree
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
1731-even-odd-tree
2306-create-binary-tree-from-descriptions
2347-count-nodes-equal-to-average-of-subtree
2384-root-equals-sum-of-children
2416-evaluate-boolean-binary-tree
2493-reverse-odd-levels-of-binary-tree

Depth-First Search

0079-word-search
0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0341-flatten-nested-list-iterator
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0529-minesweeper
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0547-number-of-provinces
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0671-second-minimum-node-in-a-binary-tree
0690-employee-importance
0733-flood-fill
0799-minimum-distance-between-bst-nodes
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
1005-univalued-binary-tree
1021-distribute-coins-in-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1114-binary-search-tree-to-greater-sum-tree
1161-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1285-balance-a-binary-search-tree
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree
2493-reverse-odd-levels-of-binary-tree
2793-count-the-number-of-complete-components

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0129-sum-root-to-leaf-numbers
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0671-second-minimum-node-in-a-binary-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0799-minimum-distance-between-bst-nodes
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
1005-univalued-binary-tree
1021-distribute-coins-in-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1114-binary-search-tree-to-greater-sum-tree
1161-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1285-balance-a-binary-search-tree
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
1731-even-odd-tree
2306-create-binary-tree-from-descriptions
2347-count-nodes-equal-to-average-of-subtree
2384-root-equals-sum-of-children
2416-evaluate-boolean-binary-tree
2493-reverse-odd-levels-of-binary-tree

Matrix

0048-rotate-image
0054-spiral-matrix
0059-spiral-matrix-ii
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0221-maximal-square
0289-game-of-life
0378-kth-smallest-element-in-a-sorted-matrix
0417-pacific-atlantic-water-flow
0498-diagonal-traverse
0529-minesweeper
0542-01-matrix
0733-flood-fill
0861-flipping-an-image
0898-transpose-matrix
0967-minimum-falling-path-sum
1036-rotting-oranges
1253-sort-the-matrix-diagonally
1351-count-negative-numbers-in-a-sorted-matrix
1463-the-k-weakest-rows-in-a-matrix
1496-lucky-numbers-in-a-matrix
1677-matrix-diagonal-sum
1711-find-valid-matrix-given-row-and-column-sums
2015-determine-whether-matrix-can-be-obtained-by-rotation
2047-find-a-peak-element-ii
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2454-largest-local-values-in-a-matrix
2585-delete-greatest-value-in-each-row
2606-difference-between-ones-and-zeros-in-row-and-column
2631-sort-the-students-by-their-kth-score
2685-first-completely-painted-row-or-column
2737-row-with-maximum-ones
3227-find-missing-and-repeated-values
3330-modify-the-matrix
3691-minimum-operations-to-make-columns-strictly-increasing

Trie

0014-longest-common-prefix
0208-implement-trie-prefix-tree
0648-replace-words
0720-longest-word-in-dictionary
3193-maximum-strong-pair-xor-i
3309-count-prefix-and-suffix-pairs-i

Rolling Hash

0187-repeated-dna-sequences
3309-count-prefix-and-suffix-pairs-i

Hash Function

0187-repeated-dna-sequences
0572-subtree-of-another-tree
0816-design-hashset
0817-design-hashmap
3309-count-prefix-and-suffix-pairs-i

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0222-count-complete-tree-nodes
0268-missing-number
0275-h-index-ii
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0378-kth-smallest-element-in-a-sorted-matrix
0532-k-diff-pairs-in-an-array
0611-valid-triangle-number
0658-find-k-closest-elements
0713-subarray-product-less-than-k
0745-find-smallest-letter-greater-than-target
0882-peak-index-in-a-mountain-array
1046-max-consecutive-ones-iii
1232-sum-of-mutated-array-closest-to-target
1351-count-negative-numbers-in-a-sorted-matrix
1463-the-k-weakest-rows-in-a-matrix
1486-find-the-distance-value-between-two-arrays
1675-magnetic-force-between-two-balls
1730-special-array-with-x-elements-greater-than-or-equal-x
2047-find-a-peak-element-ii
2134-maximize-the-confusion-of-an-exam
2392-successful-pairs-of-spells-and-potions
2614-maximum-count-of-positive-integer-and-negative-integer
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
2917-count-pairs-whose-sum-is-less-than-target
3790-fruits-into-baskets-ii

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0148-sort-list
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0654-maximum-binary-tree
1285-balance-a-binary-search-tree

Math

0002-add-two-numbers
0007-reverse-integer
0012-integer-to-roman
0029-divide-two-integers
0048-rotate-image
0050-powx-n
0062-unique-paths
0066-plus-one
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0189-rotate-array
0202-happy-number
0227-basic-calculator-ii
0263-ugly-number
0264-ugly-number-ii
0268-missing-number
0273-integer-to-english-words
0282-expression-add-operators
0367-valid-perfect-square
0504-base-7
0628-maximum-product-of-three-numbers
0830-largest-triangle-area
0944-smallest-range-i
1033-broken-calculator
1119-robot-bounded-in-circle
1236-n-th-tribonacci-number
1303-minimum-moves-to-reach-target-score
1370-count-number-of-nice-subarrays
1378-cells-with-odd-values-in-a-matrix
1390-four-divisors
1411-convert-binary-number-in-a-linked-list-to-integer
1430-find-the-k-beauty-of-a-number
1448-maximum-69-number
1500-count-largest-group
1585-the-kth-factor-of-n
1642-water-bottles
1683-maximum-number-of-coins-you-can-get
1693-sum-of-all-odd-length-subarrays
1817-calculate-money-in-leetcode-bank
1889-check-if-number-is-a-sum-of-powers-of-three
1951-find-the-winner-of-the-circular-game
2032-largest-odd-number-in-string
2324-find-triangular-sum-of-an-array
2432-number-of-zero-filled-subarrays
2481-strictly-palindromic-number
2661-smallest-missing-non-negative-integer-after-operations
2903-insert-greatest-common-divisors-in-linked-list
3055-maximum-odd-binary-number
3227-find-missing-and-repeated-values
3279-alice-and-bob-playing-flower-game
3336-water-bottles-ii
3567-convert-date-to-binary
3676-smallest-number-with-all-set-bits
3704-count-partitions-with-even-sum-difference
3768-check-if-digits-are-equal-in-string-after-operations-i
3817-maximum-containers-on-a-ship
3830-find-closest-person

Greedy

0011-container-with-most-water
0044-wildcard-matching
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0135-candy
0402-remove-k-digits
0409-longest-palindrome
0455-assign-cookies
0561-array-partition
0611-valid-triangle-number
0621-task-scheduler
0768-partition-labels
0780-max-chunks-to-make-sorted
1033-broken-calculator
1047-maximize-sum-of-array-after-k-negations
1049-minimum-domino-rotations-for-equal-row
1285-balance-a-binary-search-tree
1303-minimum-moves-to-reach-target-score
1341-split-a-string-in-balanced-strings
1407-group-the-people-given-the-group-size-they-belong-to
1448-maximum-69-number
1464-reduce-array-size-to-the-half
1683-maximum-number-of-coins-you-can-get
1711-find-valid-matrix-given-row-and-column-sums
1829-maximum-units-on-a-truck
1938-minimum-operations-to-make-the-array-increasing
2032-largest-odd-number-in-string
2123-the-number-of-weak-characters-in-the-game
2248-minimum-cost-of-buying-candies-with-discount
2436-make-array-zero-by-subtracting-equal-amounts
2661-smallest-missing-non-negative-integer-after-operations
2756-buy-two-chocolates
3055-maximum-odd-binary-number
3075-maximize-happiness-of-selected-children
3241-divide-array-into-arrays-with-max-difference
3334-apple-redistribution-into-boxes
3691-minimum-operations-to-make-columns-strictly-increasing

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0042-trapping-rain-water
0061-rotate-list
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0086-partition-list
0088-merge-sorted-array
0125-valid-palindrome
0142-linked-list-cycle-ii
0143-reorder-list
0148-sort-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0287-find-the-duplicate-number
0344-reverse-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0455-assign-cookies
0532-k-diff-pairs-in-an-array
0557-reverse-words-in-a-string-iii
0611-valid-triangle-number
0653-two-sum-iv-input-is-a-bst
0658-find-k-closest-elements
0768-partition-labels
0861-flipping-an-image
0941-sort-array-by-parity
0958-sort-array-by-parity-ii
1019-squares-of-a-sorted-array
1454-remove-palindromic-subsequences
1486-find-the-distance-value-between-two-arrays
1894-merge-strings-alternately
2128-reverse-prefix-of-word
2216-delete-the-middle-node-of-a-linked-list
2231-find-first-palindromic-string-in-the-array
2236-maximum-twin-sum-of-a-linked-list
2265-partition-array-according-to-given-pivot
2392-successful-pairs-of-spells-and-potions
2481-strictly-palindromic-number
2524-largest-positive-integer-that-exists-with-its-negative
2551-apply-operations-to-an-array
2561-number-of-distinct-averages
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2917-count-pairs-whose-sum-is-less-than-target

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0173-binary-search-tree-iterator
0225-implement-stack-using-queues
0227-basic-calculator-ii
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0341-flatten-nested-list-iterator
0394-decode-string
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0636-exclusive-time-of-functions
0654-maximum-binary-tree
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0780-max-chunks-to-make-sorted
0886-score-of-parentheses
0933-increasing-order-search-tree
0943-sum-of-subarray-minimums
1072-next-greater-node-in-linked-list
1078-remove-outermost-parentheses
1128-remove-all-adjacent-duplicates-in-string
1320-remove-all-adjacent-duplicates-in-string-ii
1570-final-prices-with-a-special-discount-in-a-shop
1666-make-the-string-great
1737-maximum-nesting-depth-of-the-parentheses
1802-number-of-students-unable-to-eat-lunch
2123-the-number-of-weak-characters-in-the-game
2128-reverse-prefix-of-word
2227-sum-of-subarray-ranges
2236-maximum-twin-sum-of-a-linked-list
2573-remove-nodes-from-linked-list
3447-clear-digits

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0061-rotate-list
0083-remove-duplicates-from-sorted-list
0086-partition-list
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0142-linked-list-cycle-ii
0143-reorder-list
0146-lru-cache
0148-sort-list
0160-intersection-of-two-linked-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0328-odd-even-linked-list
0460-lfu-cache
0816-design-hashset
0817-design-hashmap
0838-design-linked-list
1072-next-greater-node-in-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
2216-delete-the-middle-node-of-a-linked-list
2236-maximum-twin-sum-of-a-linked-list
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2573-remove-nodes-from-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0044-wildcard-matching
0050-powx-n
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0273-integer-to-english-words
0394-decode-string
1951-find-the-winner-of-the-circular-game
2573-remove-nodes-from-linked-list

Bit Manipulation

0029-divide-two-integers
0078-subsets
0136-single-number
0187-repeated-dna-sequences
0222-count-complete-tree-nodes
0260-single-number-iii
0268-missing-number
0287-find-the-duplicate-number
0473-matchsticks-to-square
0526-beautiful-arrangement
0645-set-mismatch
0861-flipping-an-image
1786-count-the-number-of-consistent-strings
1839-decode-xored-array
2308-divide-array-into-equal-pairs
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and
2519-find-the-original-array-of-prefix-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
3093-sum-of-values-at-indices-with-k-set-bits
3193-maximum-strong-pair-xor-i
3428-find-the-xor-of-numbers-which-appear-twice
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3676-smallest-number-with-all-set-bits

Brainteaser

2481-strictly-palindromic-number
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings

Bucket Sort

0164-maximum-gap
0347-top-k-frequent-elements

Radix Sort

0164-maximum-gap

Merge Sort

0023-merge-k-sorted-lists
0148-sort-list

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0297-serialize-and-deserialize-binary-tree
0301-remove-invalid-parentheses
0322-coin-change
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0529-minesweeper
0530-minimum-absolute-difference-in-bst
0542-01-matrix
0547-number-of-provinces
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0690-employee-importance
0733-flood-fill
0799-minimum-distance-between-bst-nodes
1005-univalued-binary-tree
1035-cousins-in-binary-tree
1036-rotting-oranges
1161-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
1731-even-odd-tree
2493-reverse-odd-levels-of-binary-tree
2793-count-the-number-of-complete-components

Backtracking

0017-letter-combinations-of-a-phone-number
0039-combination-sum
0051-n-queens
0078-subsets
0079-word-search
0113-path-sum-ii
0131-palindrome-partitioning
0257-binary-tree-paths
0282-expression-add-operators
0301-remove-invalid-parentheses
0473-matchsticks-to-square
0526-beautiful-arrangement
1160-letter-tile-possibilities
2107-find-unique-binary-string

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0654-maximum-binary-tree
0739-daily-temperatures
0780-max-chunks-to-make-sorted
0943-sum-of-subarray-minimums
1072-next-greater-node-in-linked-list
1570-final-prices-with-a-special-discount-in-a-shop
2123-the-number-of-weak-characters-in-the-game
2227-sum-of-subarray-ranges
2573-remove-nodes-from-linked-list

Simulation

0054-spiral-matrix
0059-spiral-matrix-ii
0289-game-of-life
0498-diagonal-traverse
0657-robot-return-to-origin
0682-baseball-game
0735-asteroid-collision
0861-flipping-an-image
0898-transpose-matrix
0987-reveal-cards-in-increasing-order
1119-robot-bounded-in-circle
1310-watering-plants
1378-cells-with-odd-values-in-a-matrix
1382-calculate-amount-paid-in-taxes
1642-water-bottles
1802-number-of-students-unable-to-eat-lunch
1951-find-the-winner-of-the-circular-game
2195-time-needed-to-buy-tickets
2265-partition-array-according-to-given-pivot
2274-keep-multiplying-found-values-by-two
2299-merge-nodes-in-between-zeros
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2436-make-array-zero-by-subtracting-equal-amounts
2551-apply-operations-to-an-array
2585-delete-greatest-value-in-each-row
2606-difference-between-ones-and-zeros-in-row-and-column
2639-separate-the-digits-in-an-array
2847-find-maximum-number-of-string-pairs
3311-ant-on-the-boundary
3336-water-bottles-ii
3426-minimum-number-of-chairs-in-a-waiting-room
3447-clear-digits
3533-snake-in-matrix
3768-check-if-digits-are-equal-in-string-after-operations-i
3790-fruits-into-baskets-ii
3811-reverse-degree-of-a-string

Counting Sort

0274-h-index
0347-top-k-frequent-elements
0383-ransom-note
0387-first-unique-character-in-a-string
0561-array-partition
0594-longest-harmonious-subsequence
0621-task-scheduler
1034-subarrays-with-k-different-integers
1160-letter-tile-possibilities
1297-maximum-number-of-balloons
1341-split-a-string-in-balanced-strings
1354-find-players-with-zero-or-one-losses
1469-minimum-number-of-steps-to-make-two-strings-anagram
1786-count-the-number-of-consistent-strings
2053-check-if-all-characters-have-equal-number-of-occurrences
2163-kth-distinct-string-in-an-array
2269-count-elements-with-strictly-smaller-and-greater-elements
2308-divide-array-into-equal-pairs
2331-intersection-of-multiple-arrays
2421-maximum-number-of-pairs-in-array
2614-maximum-count-of-positive-integer-and-negative-integer
3242-count-elements-with-maximum-frequency
3778-transform-array-by-parity
3872-find-most-frequent-vowel-and-consonant

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0264-ugly-number-ii
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0506-relative-ranks
0621-task-scheduler
0658-find-k-closest-elements
1463-the-k-weakest-rows-in-a-matrix
1464-reduce-array-size-to-the-half
2436-make-array-zero-by-subtracting-equal-amounts
2585-delete-greatest-value-in-each-row

Dynamic Programming

0005-longest-palindromic-substring
0042-trapping-rain-water
0044-wildcard-matching
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0072-edit-distance
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0131-palindrome-partitioning
0198-house-robber
0221-maximal-square
0264-ugly-number-ii
0322-coin-change
0392-is-subsequence
0473-matchsticks-to-square
0518-coin-change-ii
0526-beautiful-arrangement
0542-01-matrix
0740-delete-and-earn
0747-min-cost-climbing-stairs
0943-sum-of-subarray-minimums
0967-minimum-falling-path-sum
1121-partition-array-for-maximum-sum
1236-n-th-tribonacci-number

Game Theory

1683-maximum-number-of-coins-you-can-get

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0187-repeated-dna-sequences
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0594-longest-harmonious-subsequence
0643-maximum-average-subarray-i
0658-find-k-closest-elements
0713-subarray-product-less-than-k
0940-fruit-into-baskets
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1430-find-the-k-beauty-of-a-number
1460-number-of-substrings-containing-all-three-characters
1538-maximum-points-you-can-obtain-from-cards
1755-defuse-the-bomb
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2134-maximize-the-confusion-of-an-exam
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2866-longest-even-odd-subarray-with-threshold
3193-maximum-strong-pair-xor-i
3349-maximum-length-substring-with-two-occurrences
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0525-contiguous-array
0713-subarray-product-less-than-k
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1538-maximum-points-you-can-obtain-from-cards
1693-sum-of-all-odd-length-subarrays
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2134-maximize-the-confusion-of-an-exam
2471-minimum-amount-of-time-to-collect-garbage
2483-minimum-penalty-for-a-shop
3311-ant-on-the-boundary
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3704-count-partitions-with-even-sum-difference
3731-sum-of-variable-length-subarrays

Design

0146-lru-cache
0155-min-stack
0173-binary-search-tree-iterator
0208-implement-trie-prefix-tree
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0284-peeking-iterator
0297-serialize-and-deserialize-binary-tree
0341-flatten-nested-list-iterator
0460-lfu-cache
0816-design-hashset
0817-design-hashmap
0838-design-linked-list

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0341-flatten-nested-list-iterator
0387-first-unique-character-in-a-string
0987-reveal-cards-in-increasing-order
1802-number-of-students-unable-to-eat-lunch
1951-find-the-winner-of-the-circular-game
2195-time-needed-to-buy-tickets
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Binary Search Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0173-binary-search-tree-iterator
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0799-minimum-distance-between-bst-nodes
0933-increasing-order-search-tree
0975-range-sum-of-bst
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree
1427-all-elements-in-two-binary-search-trees

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Number Theory

1585-the-kth-factor-of-n
2903-insert-greatest-common-divisors-in-linked-list
3768-check-if-digits-are-equal-in-string-after-operations-i

Segment Tree

0406-queue-reconstruction-by-height
3790-fruits-into-baskets-ii

Ordered Set

2447-merge-similar-items

Memoization

0070-climbing-stairs
1236-n-th-tribonacci-number

Union Find

0130-surrounded-regions
0200-number-of-islands
0547-number-of-provinces
2793-count-the-number-of-complete-components

Iterator

0173-binary-search-tree-iterator
0284-peeking-iterator
0341-flatten-nested-list-iterator

Graph

0133-clone-graph
0207-course-schedule
0547-number-of-provinces
1039-find-the-town-judge
2793-count-the-number-of-complete-components

Topological Sort

0207-course-schedule

Bitmask

0473-matchsticks-to-square
0526-beautiful-arrangement

Doubly-Linked List

0146-lru-cache
0460-lfu-cache

Combinatorics

0062-unique-paths
2324-find-triangular-sum-of-an-array
3768-check-if-digits-are-equal-in-string-after-operations-i

Binary Indexed Tree

0406-queue-reconstruction-by-height

Geometry

0830-largest-triangle-area

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published