Skip to content

PriyankaJain-1998/Leetcode_Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode_Solutions

This folder includes the leetcode solutions.

Array

0330-patching-array
0853-most-profit-assigning-work
1675-magnetic-force-between-two-balls

Greedy

0330-patching-array
0853-most-profit-assigning-work

Math

0633-sum-of-square-numbers

Two Pointers

0633-sum-of-square-numbers
0853-most-profit-assigning-work

Binary Search

0633-sum-of-square-numbers
0853-most-profit-assigning-work
1675-magnetic-force-between-two-balls

Sorting

0853-most-profit-assigning-work
1675-magnetic-force-between-two-balls

LeetCode Topics

Database

0175-combine-two-tables
0197-rising-temperature
0570-managers-with-at-least-5-direct-reports
0577-employee-bonus
0584-find-customer-referee
0595-big-countries
0596-classes-more-than-5-students
0619-biggest-single-number
0620-not-boring-movies
1135-customers-who-bought-all-products
1153-product-sales-analysis-i
1155-product-sales-analysis-iii
1161-project-employees-i
1245-user-activity-for-the-past-30-days-i
1258-article-views-i
1292-immediate-food-delivery-ii
1317-monthly-transactions-i
1338-queries-quality-and-percentage
1390-average-selling-price
1415-students-and-examinations
1462-list-the-products-ordered-in-a-period
1509-replace-employee-id-with-the-unique-identifier
1724-customer-who-visited-but-did-not-make-any-transactions
1773-percentage-of-users-attended-a-contest
1801-average-time-of-process-per-machine
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1908-recyclable-and-low-fat-products
1942-primary-department-for-each-employee
2087-confirmation-rate
2495-number-of-unique-subjects-taught-by-each-teacher

Array

0015-3sum
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0066-plus-one
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0081-search-in-rotated-sorted-array-ii
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0119-pascals-triangle-ii
0136-single-number
0139-word-break
0189-rotate-array
0200-number-of-islands
0215-kth-largest-element-in-an-array
0219-contains-duplicate-ii
0228-summary-ranges
0229-majority-element-ii
0238-product-of-array-except-self
0240-search-a-2d-matrix-ii
0268-missing-number
0274-h-index
0283-move-zeroes
0347-top-k-frequent-elements
0413-arithmetic-slices
0419-battleships-in-a-board
0436-find-right-interval
0456-132-pattern
0496-next-greater-element-i
0506-relative-ranks
0560-subarray-sum-equals-k
0594-longest-harmonious-subsequence
0628-maximum-product-of-three-numbers
0643-maximum-average-subarray-i
0645-set-mismatch
0724-find-pivot-index
0745-find-smallest-letter-greater-than-target
0748-largest-number-at-least-twice-of-others
0792-binary-search
0837-most-common-word
0906-walking-robot-simulation
0932-monotonic-array
1014-k-closest-points-to-origin
1016-subarray-sums-divisible-by-k
1018-largest-perimeter-triangle
1036-rotting-oranges
1046-max-consecutive-ones-iii
1056-capacity-to-ship-packages-within-d-days
1249-snapshot-array
1256-rank-transform-of-an-array
1306-minimum-absolute-difference
1319-unique-number-of-occurrences
1325-path-with-maximum-probability
1349-check-if-it-is-a-straight-line
1364-tuple-with-same-product
1378-cells-with-odd-values-in-a-matrix
1392-find-the-difference-of-two-arrays
1400-find-winner-on-a-tic-tac-toe-game
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
1486-find-the-distance-value-between-two-arrays
1524-string-matching-in-an-array
1584-average-salary-excluding-the-minimum-and-maximum-salary
1626-can-make-arithmetic-progression-from-sequence
1631-number-of-sub-arrays-with-odd-sum
1635-number-of-good-pairs
1646-kth-missing-positive-number
1682-most-visited-sector-in-a-circular-track
1694-make-sum-divisible-by-p
1699-number-of-ways-where-square-of-number-is-equal-to-product-of-two-numbers
1741-sort-array-by-increasing-frequency
1755-defuse-the-bomb
1833-find-the-highest-altitude
1848-sum-of-unique-elements
1927-maximum-ascending-subarray-sum
1935-minimum-number-of-operations-to-reinitialize-a-permutation
1950-sign-of-the-product-of-an-array
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2117-find-original-array-from-doubled-array
2123-the-number-of-weak-characters-in-the-game
2132-convert-1d-array-into-2d-array
2146-check-if-word-can-be-placed-in-crossword
2181-smallest-index-with-equal-value
2219-maximum-number-of-words-found-in-sentences
2245-destroying-asteroids
2261-all-divisions-with-the-highest-score-of-a-binary-array
2270-find-all-lonely-numbers-in-the-array
2292-counting-words-with-a-given-prefix
2338-minimum-consecutive-cards-to-pick-up
2341-count-prefixes-of-a-given-string
2398-check-if-matrix-is-x-matrix
2428-equal-row-and-column-pairs
2436-make-array-zero-by-subtracting-equal-amounts
2442-number-of-arithmetic-triplets
2478-longest-nice-subarray
3165-find-indices-with-index-and-value-difference-i
3193-maximum-strong-pair-xor-i
3311-ant-on-the-boundary
3321-type-of-triangle
3381-shortest-subarray-with-or-at-least-k-i
3463-alternating-groups-i
3471-minimum-average-of-smallest-and-largest-elements
3501-delete-nodes-from-linked-list-present-in-array
3582-find-indices-of-stable-mountains

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0081-search-in-rotated-sorted-array-ii
0240-search-a-2d-matrix-ii
0268-missing-number
0436-find-right-interval
0441-arranging-coins
0456-132-pattern
0745-find-smallest-letter-greater-than-target
0792-binary-search
1046-max-consecutive-ones-iii
1056-capacity-to-ship-packages-within-d-days
1249-snapshot-array
1358-find-positive-integer-solution-for-a-given-equation
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
1486-find-the-distance-value-between-two-arrays
1646-kth-missing-positive-number
2006-find-the-student-that-will-replace-the-chalk

Matrix

0200-number-of-islands
0240-search-a-2d-matrix-ii
0419-battleships-in-a-board
1036-rotting-oranges
1400-find-winner-on-a-tic-tac-toe-game
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2146-check-if-word-can-be-placed-in-crossword
2398-check-if-matrix-is-x-matrix
2428-equal-row-and-column-pairs

Sorting

0015-3sum
0075-sort-colors
0088-merge-sorted-array
0215-kth-largest-element-in-an-array
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0274-h-index
0347-top-k-frequent-elements
0389-find-the-difference
0436-find-right-interval
0506-relative-ranks
0594-longest-harmonious-subsequence
0628-maximum-product-of-three-numbers
0645-set-mismatch
0748-largest-number-at-least-twice-of-others
1014-k-closest-points-to-origin
1018-largest-perimeter-triangle
1256-rank-transform-of-an-array
1306-minimum-absolute-difference
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
1486-find-the-distance-value-between-two-arrays
1488-sort-integers-by-the-power-value
1584-average-salary-excluding-the-minimum-and-maximum-salary
1626-can-make-arithmetic-progression-from-sequence
1741-sort-array-by-increasing-frequency
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2117-find-original-array-from-doubled-array
2123-the-number-of-weak-characters-in-the-game
2245-destroying-asteroids
2436-make-array-zero-by-subtracting-equal-amounts
3321-type-of-triangle
3471-minimum-average-of-smallest-and-largest-elements

Math

0007-reverse-integer
0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0050-powx-n
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0096-unique-binary-search-trees
0171-excel-sheet-column-number
0189-rotate-array
0227-basic-calculator-ii
0231-power-of-two
0258-add-digits
0268-missing-number
0279-perfect-squares
0326-power-of-three
0412-fizz-buzz
0441-arranging-coins
0445-add-two-numbers-ii
0628-maximum-product-of-three-numbers
1013-fibonacci-number
1014-k-closest-points-to-origin
1018-largest-perimeter-triangle
1086-divisor-game
1260-day-of-the-year
1349-check-if-it-is-a-straight-line
1358-find-positive-integer-solution-for-a-given-equation
1378-cells-with-odd-values-in-a-matrix
1430-find-the-k-beauty-of-a-number
1444-number-of-steps-to-reduce-a-number-to-zero
1543-simplified-fractions
1630-count-odd-numbers-in-an-interval-range
1631-number-of-sub-arrays-with-odd-sum
1635-number-of-good-pairs
1699-number-of-ways-where-square-of-number-is-equal-to-product-of-two-numbers
1800-concatenation-of-consecutive-binary-numbers
1935-minimum-number-of-operations-to-reinitialize-a-permutation
1950-sign-of-the-product-of-an-array
2481-strictly-palindromic-number
3172-divisible-and-non-divisible-sums-difference
3321-type-of-triangle
3337-count-substrings-starting-and-ending-with-given-character
3371-harshad-number
3626-smallest-divisible-digit-product-i

Bit Manipulation

0067-add-binary
0136-single-number
0190-reverse-bits
0191-number-of-1-bits
0231-power-of-two
0268-missing-number
0338-counting-bits
0389-find-the-difference
0461-hamming-distance
0476-number-complement
0645-set-mismatch
1054-complement-of-base-10-integer
1444-number-of-steps-to-reduce-a-number-to-zero
1800-concatenation-of-consecutive-binary-numbers
2427-first-letter-to-appear-twice
2478-longest-nice-subarray
3193-maximum-strong-pair-xor-i
3381-shortest-subarray-with-or-at-least-k-i

Recursion

0021-merge-two-sorted-lists
0050-powx-n
0143-reorder-list
0206-reverse-linked-list
0231-power-of-two
0326-power-of-three
0394-decode-string
1013-fibonacci-number

Two Pointers

0015-3sum
0028-find-the-index-of-the-first-occurrence-in-a-string
0061-rotate-list
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0189-rotate-array
0283-move-zeroes
0557-reverse-words-in-a-string-iii
1358-find-positive-integer-solution-for-a-given-equation
1468-check-if-n-and-its-double-exist
1486-find-the-distance-value-between-two-arrays
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1699-number-of-ways-where-square-of-number-is-equal-to-product-of-two-numbers
1894-merge-strings-alternately
2128-reverse-prefix-of-word
2216-delete-the-middle-node-of-a-linked-list
2236-maximum-twin-sum-of-a-linked-list
2442-number-of-arithmetic-triplets
2481-strictly-palindromic-number
3165-find-indices-with-index-and-value-difference-i
3471-minimum-average-of-smallest-and-largest-elements

Dynamic Programming

0022-generate-parentheses
0070-climbing-stairs
0096-unique-binary-search-trees
0119-pascals-triangle-ii
0139-word-break
0279-perfect-squares
0338-counting-bits
0413-arithmetic-slices
1013-fibonacci-number
1086-divisor-game
1488-sort-integers-by-the-power-value
1631-number-of-sub-arrays-with-odd-sum
1764-maximum-repeating-substring

Memoization

0070-climbing-stairs
0139-word-break
1013-fibonacci-number
1488-sort-integers-by-the-power-value

Brainteaser

1086-divisor-game
2481-strictly-palindromic-number

Game Theory

1086-divisor-game

String

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0058-length-of-last-word
0067-add-binary
0125-valid-palindrome
0139-word-break
0151-reverse-words-in-a-string
0171-excel-sheet-column-number
0227-basic-calculator-ii
0242-valid-anagram
0290-word-pattern
0389-find-the-difference
0394-decode-string
0412-fizz-buzz
0434-number-of-segments-in-a-string
0551-student-attendance-record-i
0557-reverse-words-in-a-string-iii
0657-robot-return-to-origin
0686-repeated-string-match
0742-to-lower-case
0812-rotate-string
0837-most-common-word
1128-remove-all-adjacent-duplicates-in-string
1260-day-of-the-year
1283-reformat-date
1363-greatest-english-letter-in-upper-and-lower-case
1430-find-the-k-beauty-of-a-number
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1542-consecutive-characters
1543-simplified-fractions
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1660-thousand-separator
1666-make-the-string-great
1714-rearrange-spaces-between-words
1764-maximum-repeating-substring
1858-latest-time-by-replacing-hidden-digits
1890-sum-of-beauty-of-all-substrings
1894-merge-strings-alternately
1904-second-largest-digit-in-a-string
1933-number-of-different-integers-in-a-string
1954-replace-all-digits-with-characters
2021-remove-all-occurrences-of-a-substring
2076-sum-of-digits-of-string-after-convert
2128-reverse-prefix-of-word
2219-maximum-number-of-words-found-in-sentences
2292-counting-words-with-a-given-prefix
2337-remove-digit-from-number-to-maximize-result
2341-count-prefixes-of-a-given-string
2346-largest-3-same-digit-number-in-string
2365-percentage-of-letter-in-string
2372-rearrange-characters-to-make-target-string
2377-check-if-number-has-equal-digit-count-and-digit-value
2391-strong-password-checker-ii
2427-first-letter-to-appear-twice
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2470-removing-stars-from-a-string
2487-optimal-partition-of-string
2800-minimum-string-length-after-removing-substrings
3337-count-substrings-starting-and-ending-with-given-character
3353-existence-of-a-substring-in-a-string-and-its-reverse
3379-score-of-a-string
3447-clear-digits

Backtracking

0022-generate-parentheses

Stack

0020-valid-parentheses
0143-reorder-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0225-implement-stack-using-queues
0227-basic-calculator-ii
0394-decode-string
0445-add-two-numbers-ii
0456-132-pattern
0496-next-greater-element-i
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
1128-remove-all-adjacent-duplicates-in-string
1666-make-the-string-great
2021-remove-all-occurrences-of-a-substring
2123-the-number-of-weak-characters-in-the-game
2128-reverse-prefix-of-word
2236-maximum-twin-sum-of-a-linked-list
2470-removing-stars-from-a-string
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Tree

0096-unique-binary-search-trees
0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0437-path-sum-iii
0450-delete-node-in-a-bst
0563-binary-tree-tilt
0671-second-minimum-node-in-a-binary-tree
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1116-maximum-level-sum-of-a-binary-tree

Depth-First Search

0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0419-battleships-in-a-board
0437-path-sum-iii
0563-binary-tree-tilt
0671-second-minimum-node-in-a-binary-tree
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0904-leaf-similar-trees
0984-most-stones-removed-with-same-row-or-column
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1116-maximum-level-sum-of-a-binary-tree
2035-count-sub-islands

Binary Tree

0096-unique-binary-search-trees
0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0437-path-sum-iii
0450-delete-node-in-a-bst
0563-binary-tree-tilt
0671-second-minimum-node-in-a-binary-tree
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1079-sum-of-root-to-leaf-binary-numbers
1092-maximum-difference-between-node-and-ancestor
1116-maximum-level-sum-of-a-binary-tree

Simulation

0067-add-binary
0258-add-digits
0412-fizz-buzz
0657-robot-return-to-origin
0906-walking-robot-simulation
1378-cells-with-odd-values-in-a-matrix
1400-find-winner-on-a-tic-tac-toe-game
1682-most-visited-sector-in-a-circular-track
1800-concatenation-of-consecutive-binary-numbers
1935-minimum-number-of-operations-to-reinitialize-a-permutation
2006-find-the-student-that-will-replace-the-chalk
2021-remove-all-occurrences-of-a-substring
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2428-equal-row-and-column-pairs
2436-make-array-zero-by-subtracting-equal-amounts
2470-removing-stars-from-a-string
2800-minimum-string-length-after-removing-substrings
3311-ant-on-the-boundary
3447-clear-digits

Breadth-First Search

0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0199-binary-tree-right-side-view
0200-number-of-islands
0279-perfect-squares
0404-sum-of-left-leaves
0774-maximum-depth-of-n-ary-tree
1036-rotting-oranges
1116-maximum-level-sum-of-a-binary-tree
2035-count-sub-islands

Hash Table

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0139-word-break
0141-linked-list-cycle
0160-intersection-of-two-linked-lists
0219-contains-duplicate-ii
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0290-word-pattern
0347-top-k-frequent-elements
0389-find-the-difference
0496-next-greater-element-i
0560-subarray-sum-equals-k
0594-longest-harmonious-subsequence
0645-set-mismatch
0837-most-common-word
0906-walking-robot-simulation
0984-most-stones-removed-with-same-row-or-column
1016-subarray-sums-divisible-by-k
1249-snapshot-array
1256-rank-transform-of-an-array
1319-unique-number-of-occurrences
1363-greatest-english-letter-in-upper-and-lower-case
1364-tuple-with-same-product
1392-find-the-difference-of-two-arrays
1400-find-winner-on-a-tic-tac-toe-game
1468-check-if-n-and-its-double-exist
1635-number-of-good-pairs
1694-make-sum-divisible-by-p
1699-number-of-ways-where-square-of-number-is-equal-to-product-of-two-numbers
1741-sort-array-by-increasing-frequency
1848-sum-of-unique-elements
1890-sum-of-beauty-of-all-substrings
1904-second-largest-digit-in-a-string
1933-number-of-different-integers-in-a-string
2117-find-original-array-from-doubled-array
2270-find-all-lonely-numbers-in-the-array
2338-minimum-consecutive-cards-to-pick-up
2372-rearrange-characters-to-make-target-string
2377-check-if-number-has-equal-digit-count-and-digit-value
2427-first-letter-to-appear-twice
2428-equal-row-and-column-pairs
2436-make-array-zero-by-subtracting-equal-amounts
2442-number-of-arithmetic-triplets
2487-optimal-partition-of-string
3193-maximum-strong-pair-xor-i
3353-existence-of-a-substring-in-a-string-and-its-reverse
3501-delete-nodes-from-linked-list-present-in-array

Linked List

0021-merge-two-sorted-lists
0061-rotate-list
0141-linked-list-cycle
0143-reorder-list
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0328-odd-even-linked-list
0445-add-two-numbers-ii
2216-delete-the-middle-node-of-a-linked-list
2236-maximum-twin-sum-of-a-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Union Find

0200-number-of-islands
0984-most-stones-removed-with-same-row-or-column
2035-count-sub-islands

Graph

0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability
1916-find-center-of-star-graph
2803-modify-graph-edge-weights

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0506-relative-ranks
1014-k-closest-points-to-origin
1325-path-with-maximum-probability
1463-the-k-weakest-rows-in-a-matrix
2436-make-array-zero-by-subtracting-equal-amounts
2803-modify-graph-edge-weights

Shortest Path

1325-path-with-maximum-probability
2803-modify-graph-edge-weights

Sliding Window

0003-longest-substring-without-repeating-characters
0219-contains-duplicate-ii
0413-arithmetic-slices
0594-longest-harmonious-subsequence
0643-maximum-average-subarray-i
1046-max-consecutive-ones-iii
1430-find-the-k-beauty-of-a-number
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1755-defuse-the-bomb
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2338-minimum-consecutive-cards-to-pick-up
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2478-longest-nice-subarray
3193-maximum-strong-pair-xor-i
3381-shortest-subarray-with-or-at-least-k-i
3463-alternating-groups-i

Prefix Sum

0238-product-of-array-except-self
0560-subarray-sum-equals-k
0724-find-pivot-index
1016-subarray-sums-divisible-by-k
1046-max-consecutive-ones-iii
1537-maximum-score-after-splitting-a-string
1631-number-of-sub-arrays-with-odd-sum
1694-make-sum-divisible-by-p
1833-find-the-highest-altitude
2006-find-the-student-that-will-replace-the-chalk
3311-ant-on-the-boundary

Binary Search Tree

0096-unique-binary-search-trees
0108-convert-sorted-array-to-binary-search-tree
0450-delete-node-in-a-bst
0783-search-in-a-binary-search-tree

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree
0190-reverse-bits
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0686-repeated-string-match
0812-rotate-string
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1764-maximum-repeating-substring
2292-counting-words-with-a-given-prefix

Trie

0139-word-break
3193-maximum-strong-pair-xor-i

Counting

0229-majority-element-ii
0347-top-k-frequent-elements
0594-longest-harmonious-subsequence
0837-most-common-word
1364-tuple-with-same-product
1635-number-of-good-pairs
1848-sum-of-unique-elements
1890-sum-of-beauty-of-all-substrings
2270-find-all-lonely-numbers-in-the-array
2372-rearrange-characters-to-make-target-string
2377-check-if-number-has-equal-digit-count-and-digit-value
2427-first-letter-to-appear-twice
3337-count-substrings-starting-and-ending-with-given-character

Design

0225-implement-stack-using-queues
1249-snapshot-array

Queue

0225-implement-stack-using-queues

Number Theory

0258-add-digits
1543-simplified-fractions

Greedy

1018-largest-perimeter-triangle
1858-latest-time-by-replacing-hidden-digits
2117-find-original-array-from-doubled-array
2123-the-number-of-weak-characters-in-the-game
2245-destroying-asteroids
2337-remove-digit-from-number-to-maximize-result
2436-make-array-zero-by-subtracting-equal-amounts
2487-optimal-partition-of-string

Enumeration

1363-greatest-english-letter-in-upper-and-lower-case
2146-check-if-word-can-be-placed-in-crossword
2337-remove-digit-from-number-to-maximize-result
2442-number-of-arithmetic-triplets
3626-smallest-divisible-digit-product-i

Monotonic Stack

0456-132-pattern
0496-next-greater-element-i
2123-the-number-of-weak-characters-in-the-game

Interactive

1358-find-positive-integer-solution-for-a-given-equation

Concurrency

1203-print-in-order

Counting Sort

0274-h-index

Geometry

1014-k-closest-points-to-origin
1349-check-if-it-is-a-straight-line

Bucket Sort

0347-top-k-frequent-elements

Ordered Set

0456-132-pattern

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published