Skip to content

Folder containing solutions to various LeetCode problems, showcasing my problem-solving skills and progress in algorithmic challenges.

Notifications You must be signed in to change notification settings

HariPasapuleti/Leetcode-Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Problem Solving

Welcome to my collection of LeetCode solutions! This repository contains my implementations for a variety of problems from LeetCode, covering different data structures, algorithms, and problem-solving techniques. Each solution is carefully crafted to be efficient and easy to understand.

LeetCode Stats

Overview

This repository serves as a personal log of my journey through LeetCode, where I continuously work to improve my problem-solving skills. You'll find solutions written in multiple programming languages, with a focus on Python and C++. Each problem is clearly categorized by its difficulty level (Easy, Medium, Hard) and topic (e.g., Arrays, Stack, Hash Tables, LL, BST).

Goals

  • Improve Problem-Solving Skills: By consistently solving problems, I aim to sharpen my problem-solving abilities and prepare for technical interviews.
  • Master Data Structures and Algorithms: This collection helps me to deepen my understanding of key data structures and algorithms, which are crucial for coding interviews.
  • Document Learning: I use this repository to document my thought process and the different approaches I take to solve each problem.

Structure

Each problem's solution is stored in a separate file, with the following structure:

  • Problem Description: A brief summary of the problem, along with a link to the original LeetCode problem.
  • Approach: Explanation of the approach taken to solve the problem.
  • Solution: The code implementation, optimized for efficiency.

Usage

Feel free to explore the solutions, and if you're working on a similar problem, you might find different perspectives or techniques that can help you.

LeetCode Topics

Database

0175-combine-two-tables
0176-second-highest-salary
0181-employees-earning-more-than-their-managers
0182-duplicate-emails
0184-department-highest-salary
0185-department-top-three-salaries
0196-delete-duplicate-emails
0197-rising-temperature
0570-managers-with-at-least-5-direct-reports
0584-find-customer-referee
0595-big-countries
0619-biggest-single-number
1135-customers-who-bought-all-products
1155-product-sales-analysis-iii
1182-game-play-analysis-iv
1245-user-activity-for-the-past-30-days-i
1258-article-views-i
1292-immediate-food-delivery-ii
1317-monthly-transactions-i
1327-last-person-to-fit-in-the-bus
1338-queries-quality-and-percentage
1390-average-selling-price
1462-list-the-products-ordered-in-a-period
1480-movie-rating
1625-group-sold-products-by-the-date
1664-find-users-with-valid-e-mails
1670-patients-with-a-condition
1724-customer-who-visited-but-did-not-make-any-transactions
1801-average-time-of-process-per-machine
1811-fix-names-in-a-table
1882-the-number-of-employees-which-report-to-each-employee
1908-recyclable-and-low-fat-products
1942-primary-department-for-each-employee
2024-calculate-special-bonus
2057-count-salary-categories
2087-confirmation-rate
2127-employees-whose-manager-left-the-company
2495-number-of-unique-subjects-taught-by-each-teacher

Array

0001-two-sum
0015-3sum
0016-3sum-closest
0018-4sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0036-valid-sudoku
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0041-first-missing-positive
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0047-permutations-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
0063-unique-paths-ii
0064-minimum-path-sum
0074-search-a-2d-matrix
0078-subsets
0080-remove-duplicates-from-sorted-array-ii
0081-search-in-rotated-sorted-array-ii
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0090-subsets-ii
0118-pascals-triangle
0119-pascals-triangle-ii
0120-triangle
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0135-candy
0136-single-number
0137-single-number-ii
0149-max-points-on-a-line
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0169-majority-element
0179-largest-number
0198-house-robber
0204-count-primes
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0216-combination-sum-iii
0217-contains-duplicate
0229-majority-element-ii
0268-missing-number
0283-move-zeroes
0322-coin-change
0334-increasing-triplet-subsequence
0349-intersection-of-two-arrays
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0455-assign-cookies
0485-max-consecutive-ones
0493-reverse-pairs
0494-target-sum
0496-next-greater-element-i
0503-next-greater-element-ii
0518-coin-change-ii
0540-single-element-in-a-sorted-array
0560-subarray-sum-equals-k
0594-longest-harmonious-subsequence
0599-minimum-index-sum-of-two-lists
0611-valid-triangle-number
0624-maximum-distance-in-arrays
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0719-find-k-th-smallest-pair-distance
0739-daily-temperatures
0747-min-cost-climbing-stairs
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0792-binary-search
0797-rabbits-in-forest
0830-largest-triangle-area
0859-design-circular-deque
0890-lemonade-change
0907-koko-eating-bananas
0919-projection-area-of-3d-shapes
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
0952-word-subsets
0966-binary-subarrays-with-sum
0967-minimum-falling-path-sum
1018-largest-perimeter-triangle
1034-subarrays-with-k-different-integers
1036-rotting-oranges
1046-max-consecutive-ones-iii
1049-minimum-domino-rotations-for-equal-row
1063-best-sightseeing-pair
1127-last-stone-weight
1147-flip-columns-for-maximum-number-of-equal-rows
1227-number-of-equivalent-domino-pairs
1325-path-with-maximum-probability
1335-maximum-candies-allocated-to-k-children
1350-remove-sub-folders-from-the-filesystem
1353-find-resultant-array-after-removing-anagrams
1364-tuple-with-same-product
1370-count-number-of-nice-subarrays
1396-count-servers-that-communicate
1397-search-suggestions-system
1408-find-the-smallest-divisor-given-a-threshold
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1477-product-of-the-last-k-numbers
1478-maximum-number-of-events-that-can-be-attended
1510-find-lucky-integer-in-an-array
1524-string-matching-in-an-array
1538-maximum-points-you-can-obtain-from-cards
1570-final-prices-with-a-special-discount-in-a-shop
1586-longest-subarray-of-1s-after-deleting-one-element
1605-minimum-number-of-days-to-make-m-bouquets
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1646-kth-missing-positive-number
1656-count-good-triplets
1700-minimum-time-to-make-rope-colorful
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1755-defuse-the-bomb
1786-count-the-number-of-consistent-strings
1813-maximum-erasure-value
1849-maximum-absolute-sum-of-any-subarray
1878-check-if-array-is-sorted-and-rotated
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1927-maximum-ascending-subarray-sum
1966-frequency-of-the-most-frequent-element
1972-rotating-the-box
1993-sum-of-all-subset-xor-totals
1995-finding-pairs-with-a-certain-sum
2006-find-the-student-that-will-replace-the-chalk
2038-nearest-exit-from-entrance-in-maze
2048-build-array-from-permutation
2054-the-number-of-the-smallest-unoccupied-chair
2067-maximum-number-of-points-with-cost
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2144-maximum-difference-between-increasing-elements
2170-count-number-of-maximum-bitwise-or-subsets
2204-find-subsequence-of-length-k-with-the-largest-sum
2219-maximum-number-of-words-found-in-sentences
2220-find-all-possible-recipes-from-given-supplies
2227-sum-of-subarray-ranges
2232-adding-spaces-to-a-string
2244-number-of-laser-beams-in-a-bank
2262-solving-questions-with-brainpower
2271-rearrange-array-elements-by-sign
2277-count-equal-and-divisible-pairs-in-an-array
2283-sort-even-and-odd-indices-independently
2292-counting-words-with-a-given-prefix
2307-replace-non-coprime-numbers-in-array
2308-divide-array-into-equal-pairs
2312-most-frequent-number-following-key-in-an-array
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2432-number-of-zero-filled-subarrays
2433-best-poker-hand
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2478-longest-nice-subarray
2497-maximum-matching-of-players-with-trainers
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2552-maximum-sum-of-distinct-subarrays-with-length-k
2553-total-cost-to-hire-k-workers
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2614-maximum-count-of-positive-integer-and-negative-integer
2624-difference-between-element-sum-and-digit-sum-of-an-array
2626-count-the-number-of-good-subarrays
2636-maximum-subsequence-score
2640-maximum-number-of-integers-to-choose-from-a-range-i
2681-put-marbles-in-bags
2684-determine-the-winner-of-a-bowling-game
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
2856-count-complete-subarrays-in-an-array
2866-longest-even-odd-subarray-with-threshold
2870-longest-alternating-subarray
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
2892-check-if-array-is-good
3151-minimum-processing-time
3152-maximum-value-of-an-ordered-triplet-ii
3154-maximum-value-of-an-ordered-triplet-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3193-maximum-strong-pair-xor-i
3194-find-words-containing-character
3213-count-subarrays-where-max-element-appears-at-least-k-times
3241-divide-array-into-arrays-with-max-difference
3242-count-elements-with-maximum-frequency
3251-maximum-area-of-longest-diagonal-rectangle
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3321-type-of-triangle
3330-modify-the-matrix
3332-minimum-operations-to-exceed-threshold-value-ii
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3383-taking-maximum-energy-from-the-mystic-dungeon
3427-special-array-ii
3429-special-array-i
3430-count-days-without-meetings
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3490-find-the-maximum-length-of-valid-subsequence-i
3501-delete-nodes-from-linked-list-present-in-array
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3621-minimum-operations-to-make-array-values-equal-to-k
3639-zero-array-transformation-i
3648-find-the-maximum-number-of-fruits-collected
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3685-count-subarrays-of-length-three-with-a-condition
3788-maximum-unique-subarray-sum-after-deletion
3790-fruits-into-baskets-ii
3997-maximize-sum-of-at-most-k-distinct-elements
4003-longest-fibonacci-subarray
4009-bitwise-or-of-even-numbers-in-an-array
4012-earliest-time-to-finish-one-task
4039-compute-decimal-representation
4068-sum-of-elements-with-frequency-divisible-by-k

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0047-permutations-ii
0051-n-queens
0052-n-queens-ii
0077-combinations
0078-subsets
0089-gray-code
0090-subsets-ii
0093-restore-ip-addresses
0095-unique-binary-search-trees-ii
0131-palindrome-partitioning
0216-combination-sum-iii
0494-target-sum
1160-letter-tile-possibilities
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2174-next-greater-numerically-balanced-number

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0008-string-to-integer-atoi
0010-regular-expression-matching
0012-integer-to-roman
0013-roman-to-integer
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0030-substring-with-concatenation-of-all-words
0032-longest-valid-parentheses
0038-count-and-say
0043-multiply-strings
0044-wildcard-matching
0049-group-anagrams
0058-length-of-last-word
0065-valid-number
0067-add-binary
0071-simplify-path
0072-edit-distance
0076-minimum-window-substring
0087-scramble-string
0091-decode-ways
0093-restore-ip-addresses
0097-interleaving-string
0125-valid-palindrome
0131-palindrome-partitioning
0151-reverse-words-in-a-string
0165-compare-version-numbers
0179-largest-number
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0242-valid-anagram
0389-find-the-difference
0394-decode-string
0402-remove-k-digits
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0516-longest-palindromic-subsequence
0521-longest-uncommon-subsequence-i
0564-find-the-closest-palindrome
0567-permutation-in-string
0583-delete-operation-for-two-strings
0599-minimum-index-sum-of-two-lists
0678-valid-parenthesis-string
0812-rotate-string
0920-uncommon-words-from-two-sentences
0952-word-subsets
1078-remove-outermost-parentheses
1160-letter-tile-possibilities
1170-shortest-common-supersequence
1250-longest-common-subsequence
1264-maximum-number-of-words-you-can-type
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1353-find-resultant-array-after-removing-anagrams
1397-search-suggestions-system
1437-minimum-insertion-steps-to-make-a-string-palindrome
1460-number-of-substrings-containing-all-three-characters
1502-construct-k-palindrome-strings
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1700-minimum-time-to-make-rope-colorful
1737-maximum-nesting-depth-of-the-parentheses
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
1823-determine-if-string-halves-are-alike
1858-latest-time-by-replacing-hidden-digits
1890-sum-of-beauty-of-all-substrings
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1904-second-largest-digit-in-a-string
1915-check-if-one-string-swap-can-make-strings-equal
2017-minimum-number-of-flips-to-make-the-binary-string-alternating
2025-redistribute-characters-to-make-all-strings-equal
2032-largest-odd-number-in-string
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2137-final-value-of-variable-after-performing-operations
2177-check-whether-two-strings-are-almost-equivalent
2219-maximum-number-of-words-found-in-sentences
2220-find-all-possible-recipes-from-given-supplies
2221-check-if-a-parentheses-string-can-be-valid
2232-adding-spaces-to-a-string
2244-number-of-laser-beams-in-a-bank
2260-divide-a-string-into-groups-of-size-k
2292-counting-words-with-a-given-prefix
2346-largest-3-same-digit-number-in-string
2414-move-pieces-to-obtain-a-string
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2465-shifting-letters-ii
2580-circular-sentence
2691-count-vowel-strings-in-ranges
2723-find-the-longest-balanced-substring-of-a-binary-string
2800-minimum-string-length-after-removing-substrings
2887-sort-vowels-in-a-string
3018-make-string-a-subsequence-using-cyclic-increments
3194-find-words-containing-character
3267-find-longest-special-substring-that-occurs-thrice-i
3275-minimum-number-of-pushes-to-type-word-i
3309-count-prefix-and-suffix-pairs-i
3396-valid-word
3447-clear-digits
3451-string-compression-iii
3455-minimum-length-of-string-after-operations
3462-vowels-game-in-a-string
3617-find-the-original-typed-string-i
3768-check-if-digits-are-equal-in-string-after-operations-i
3872-find-most-frequent-vowel-and-consonant
4052-equal-score-substrings
4055-longest-balanced-substring-i

Greedy

0044-wildcard-matching
0045-jump-game-ii
0055-jump-game
0135-candy
0179-largest-number
0334-increasing-triplet-subsequence
0402-remove-k-digits
0435-non-overlapping-intervals
0455-assign-cookies
0611-valid-triangle-number
0624-maximum-distance-in-arrays
0678-valid-parenthesis-string
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0797-rabbits-in-forest
0890-lemonade-change
1018-largest-perimeter-triangle
1049-minimum-domino-rotations-for-equal-row
1448-maximum-69-number
1478-maximum-number-of-events-that-can-be-attended
1502-construct-k-palindrome-strings
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1818-maximum-score-from-removing-substrings
1858-latest-time-by-replacing-hidden-digits
1966-frequency-of-the-most-frequent-element
2017-minimum-number-of-flips-to-make-the-binary-string-alternating
2032-largest-odd-number-in-string
2221-check-if-a-parentheses-string-can-be-valid
2387-partition-array-such-that-maximum-difference-is-k
2497-maximum-matching-of-players-with-trainers
2509-minimize-xor
2636-maximum-subsequence-score
2640-maximum-number-of-integers-to-choose-from-a-range-i
2681-put-marbles-in-bags
2689-rearranging-fruits
2704-maximum-difference-by-remapping-a-digit
3151-minimum-processing-time
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3241-divide-array-into-arrays-with-max-difference
3275-minimum-number-of-pushes-to-type-word-i
3788-maximum-unique-subarray-sum-after-deletion
3997-maximize-sum-of-at-most-k-distinct-elements

Two Pointers

0005-longest-palindromic-substring
0015-3sum
0016-3sum-closest
0018-4sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0042-trapping-rain-water
0061-rotate-list
0080-remove-duplicates-from-sorted-array-ii
0082-remove-duplicates-from-sorted-list-ii
0086-partition-list
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0165-compare-version-numbers
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0349-intersection-of-two-arrays
0455-assign-cookies
0567-permutation-in-string
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
0908-middle-of-the-linked-list
1468-check-if-n-and-its-double-exist
1972-rotating-the-box
2216-delete-the-middle-node-of-a-linked-list
2232-adding-spaces-to-a-string
2271-rearrange-array-elements-by-sign
2392-successful-pairs-of-spells-and-potions
2414-move-pieces-to-obtain-a-string
2497-maximum-matching-of-players-with-trainers
2551-apply-operations-to-an-array
2553-total-cost-to-hire-k-workers
2581-divide-players-into-teams-of-equal-skill
3018-make-string-a-subsequence-using-cyclic-increments

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
0074-search-a-2d-matrix
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0268-missing-number
0349-intersection-of-two-arrays
0374-guess-number-higher-or-lower
0493-reverse-pairs
0540-single-element-in-a-sorted-array
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
0792-binary-search
0907-koko-eating-bananas
1046-max-consecutive-ones-iii
1335-maximum-candies-allocated-to-k-children
1397-search-suggestions-system
1408-find-the-smallest-divisor-given-a-threshold
1468-check-if-n-and-its-double-exist
1605-minimum-number-of-days-to-make-m-bouquets
1646-kth-missing-positive-number
1966-frequency-of-the-most-frequent-element
2006-find-the-student-that-will-replace-the-chalk
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2614-maximum-count-of-positive-integer-and-negative-integer
2640-maximum-number-of-integers-to-choose-from-a-range-i
2891-maximum-beauty-of-an-array-after-applying-operation
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii
3790-fruits-into-baskets-ii

Sorting

0015-3sum
0016-3sum-closest
0018-4sum
0047-permutations-ii
0049-group-anagrams
0056-merge-intervals
0088-merge-sorted-array
0169-majority-element
0179-largest-number
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0349-intersection-of-two-arrays
0389-find-the-difference
0435-non-overlapping-intervals
0451-sort-characters-by-frequency
0455-assign-cookies
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0719-find-k-th-smallest-pair-distance
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0900-reordered-power-of-2
1018-largest-perimeter-triangle
1353-find-resultant-array-after-removing-anagrams
1397-search-suggestions-system
1468-check-if-n-and-its-double-exist
1478-maximum-number-of-events-that-can-be-attended
1966-frequency-of-the-most-frequent-element
2204-find-subsequence-of-length-k-with-the-largest-sum
2283-sort-even-and-odd-indices-independently
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2497-maximum-matching-of-players-with-trainers
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2636-maximum-subsequence-score
2640-maximum-number-of-integers-to-choose-from-a-range-i
2681-put-marbles-in-bags
2689-rearranging-fruits
2695-find-score-of-an-array-after-marking-all-elements
2887-sort-vowels-in-a-string
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
2892-check-if-array-is-good
3151-minimum-processing-time
3241-divide-array-into-arrays-with-max-difference
3291-find-if-array-can-be-sorted
3321-type-of-triangle
3430-count-days-without-meetings
3997-maximize-sum-of-at-most-k-distinct-elements

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0030-substring-with-concatenation-of-all-words
0036-valid-sudoku
0037-sudoku-solver
0041-first-missing-positive
0049-group-anagrams
0076-minimum-window-substring
0128-longest-consecutive-sequence
0141-linked-list-cycle
0142-linked-list-cycle-ii
0149-max-points-on-a-line
0160-intersection-of-two-linked-lists
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0217-contains-duplicate
0229-majority-element-ii
0242-valid-anagram
0264-ugly-number-ii
0268-missing-number
0349-intersection-of-two-arrays
0389-find-the-difference
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0496-next-greater-element-i
0560-subarray-sum-equals-k
0567-permutation-in-string
0594-longest-harmonious-subsequence
0599-minimum-index-sum-of-two-lists
0797-rabbits-in-forest
0900-reordered-power-of-2
0920-uncommon-words-from-two-sentences
0940-fruit-into-baskets
0952-word-subsets
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1147-flip-columns-for-maximum-number-of-equal-rows
1160-letter-tile-possibilities
1227-number-of-equivalent-domino-pairs
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
1364-tuple-with-same-product
1370-count-number-of-nice-subarrays
1387-find-elements-in-a-contaminated-binary-tree
1460-number-of-substrings-containing-all-three-characters
1468-check-if-n-and-its-double-exist
1500-count-largest-group
1502-construct-k-palindrome-strings
1510-find-lucky-integer-in-an-array
1786-count-the-number-of-consistent-strings
1813-maximum-erasure-value
1890-sum-of-beauty-of-all-substrings
1904-second-largest-digit-in-a-string
1915-check-if-one-string-swap-can-make-strings-equal
1995-finding-pairs-with-a-certain-sum
2025-redistribute-characters-to-make-all-strings-equal
2054-the-number-of-the-smallest-unoccupied-chair
2059-unique-length-3-palindromic-subsequences
2174-next-greater-numerically-balanced-number
2177-check-whether-two-strings-are-almost-equivalent
2204-find-subsequence-of-length-k-with-the-largest-sum
2220-find-all-possible-recipes-from-given-supplies
2308-divide-array-into-equal-pairs
2312-most-frequent-number-following-key-in-an-array
2356-largest-combination-with-bitwise-and-greater-than-zero
2413-smallest-number-in-infinite-set
2433-best-poker-hand
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2552-maximum-sum-of-distinct-subarrays-with-length-k
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2626-count-the-number-of-good-subarrays
2640-maximum-number-of-integers-to-choose-from-a-range-i
2685-first-completely-painted-row-or-column
2689-rearranging-fruits
2695-find-score-of-an-array-after-marking-all-elements
2766-find-the-prefix-common-array-of-two-arrays
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
2892-check-if-array-is-good
3193-maximum-strong-pair-xor-i
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3621-minimum-operations-to-make-array-values-equal-to-k
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3788-maximum-unique-subarray-sum-after-deletion
3872-find-most-frequent-vowel-and-consonant
3997-maximize-sum-of-at-most-k-distinct-elements
4055-longest-balanced-substring-i
4068-sum-of-elements-with-frequency-divisible-by-k

Bit Manipulation

0067-add-binary
0078-subsets
0089-gray-code
0090-subsets-ii
0136-single-number
0137-single-number-ii
0231-power-of-two
0268-missing-number
0338-counting-bits
0342-power-of-four
0389-find-the-difference
0476-number-complement
0934-bitwise-ors-of-subarrays
1054-complement-of-base-10-integer
1435-xor-queries-of-a-subarray
1441-minimum-flips-to-make-a-or-b-equal-to-c
1786-count-the-number-of-consistent-strings
1993-sum-of-all-subset-xor-totals
2059-unique-length-3-palindromic-subsequences
2170-count-number-of-maximum-bitwise-or-subsets
2308-divide-array-into-equal-pairs
2323-minimum-bit-flips-to-convert-number
2356-largest-combination-with-bitwise-and-greater-than-zero
2478-longest-nice-subarray
2503-longest-subarray-with-maximum-bitwise-and
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
3193-maximum-strong-pair-xor-i
3291-find-if-array-can-be-sorted
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3508-number-of-bit-changes-to-make-two-integers-equal
3600-find-the-k-th-character-in-string-game-i
3676-smallest-number-with-all-set-bits
4009-bitwise-or-of-even-numbers-in-an-array

Math

0002-add-two-numbers
0007-reverse-integer
0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0043-multiply-strings
0048-rotate-image
0050-powx-n
0060-permutation-sequence
0062-unique-paths
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0089-gray-code
0096-unique-binary-search-trees
0149-max-points-on-a-line
0150-evaluate-reverse-polish-notation
0202-happy-number
0204-count-primes
0231-power-of-two
0264-ugly-number-ii
0268-missing-number
0326-power-of-three
0342-power-of-four
0564-find-the-closest-palindrome
0650-2-keys-keyboard
0728-self-dividing-numbers
0797-rabbits-in-forest
0830-largest-triangle-area
0900-reordered-power-of-2
0919-projection-area-of-3d-shapes
1013-fibonacci-number
1018-largest-perimeter-triangle
1086-divisor-game
1236-n-th-tribonacci-number
1370-count-number-of-nice-subarrays
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1448-maximum-69-number
1477-product-of-the-last-k-numbers
1500-count-largest-group
1642-water-bottles
1806-count-of-matches-in-tournament
1817-calculate-money-in-leetcode-bank
1993-sum-of-all-subset-xor-totals
2032-largest-odd-number-in-string
2050-count-good-numbers
2174-next-greater-numerically-balanced-number
2244-number-of-laser-beams-in-a-bank
2307-replace-non-coprime-numbers-in-array
2324-find-triangular-sum-of-an-array
2432-number-of-zero-filled-subarrays
2624-difference-between-element-sum-and-digit-sum-of-an-array
2630-alternating-digit-sum
2704-maximum-difference-by-remapping-a-digit
2748-calculate-delayed-arrival-time
2752-sum-multiples
2812-find-the-maximum-achievable-number
2903-insert-greatest-common-divisors-in-linked-list
2998-count-symmetric-integers
3172-divisible-and-non-divisible-sums-difference
3275-minimum-number-of-pushes-to-type-word-i
3279-alice-and-bob-playing-flower-game
3321-type-of-triangle
3336-water-bottles-ii
3462-vowels-game-in-a-string
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3600-find-the-k-th-character-in-string-game-i
3676-smallest-number-with-all-set-bits
3768-check-if-digits-are-equal-in-string-after-operations-i
4039-compute-decimal-representation

Counting

0169-majority-element
0229-majority-element-ii
0451-sort-characters-by-frequency
0594-longest-harmonious-subsequence
0900-reordered-power-of-2
0920-uncommon-words-from-two-sentences
1034-subarrays-with-k-different-integers
1160-letter-tile-possibilities
1227-number-of-equivalent-domino-pairs
1364-tuple-with-same-product
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1510-find-lucky-integer-in-an-array
1786-count-the-number-of-consistent-strings
1823-determine-if-string-halves-are-alike
1890-sum-of-beauty-of-all-substrings
1915-check-if-one-string-swap-can-make-strings-equal
2025-redistribute-characters-to-make-all-strings-equal
2174-next-greater-numerically-balanced-number
2177-check-whether-two-strings-are-almost-equivalent
2308-divide-array-into-equal-pairs
2312-most-frequent-number-following-key-in-an-array
2356-largest-combination-with-bitwise-and-greater-than-zero
2433-best-poker-hand
2614-maximum-count-of-positive-integer-and-negative-integer
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations
3872-find-most-frequent-vowel-and-consonant
4055-longest-balanced-substring-i
4068-sum-of-elements-with-frequency-divisible-by-k

Simulation

0043-multiply-strings
0054-spiral-matrix
0059-spiral-matrix-ii
0067-add-binary
1642-water-bottles
1806-count-of-matches-in-tournament
2006-find-the-student-that-will-replace-the-chalk
2048-build-array-from-permutation
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2232-adding-spaces-to-a-string
2260-divide-a-string-into-groups-of-size-k
2271-rearrange-array-elements-by-sign
2299-merge-nodes-in-between-zeros
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2551-apply-operations-to-an-array
2553-total-cost-to-hire-k-workers
2684-determine-the-winner-of-a-bowling-game
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2800-minimum-string-length-after-removing-substrings
3332-minimum-operations-to-exceed-threshold-value-ii
3336-water-bottles-ii
3447-clear-digits
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i
3768-check-if-digits-are-equal-in-string-after-operations-i
3790-fruits-into-baskets-ii
4009-bitwise-or-of-even-numbers-in-an-array

Dynamic Programming

0005-longest-palindromic-substring
0010-regular-expression-matching
0022-generate-parentheses
0032-longest-valid-parentheses
0042-trapping-rain-water
0044-wildcard-matching
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0087-scramble-string
0091-decode-ways
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0097-interleaving-string
0118-pascals-triangle
0119-pascals-triangle-ii
0120-triangle
0121-best-time-to-buy-and-sell-stock
0131-palindrome-partitioning
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0264-ugly-number-ii
0322-coin-change
0338-counting-bits
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0494-target-sum
0516-longest-palindromic-subsequence
0518-coin-change-ii
0583-delete-operation-for-two-strings
0650-2-keys-keyboard
0678-valid-parenthesis-string
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0747-min-cost-climbing-stairs
0806-domino-and-tromino-tiling
0934-bitwise-ors-of-subarrays
0967-minimum-falling-path-sum
1013-fibonacci-number
1063-best-sightseeing-pair
1086-divisor-game
1170-shortest-common-supersequence
1236-n-th-tribonacci-number
1250-longest-common-subsequence
1437-minimum-insertion-steps-to-make-a-string-palindrome
1474-longest-zigzag-path-in-a-binary-tree
1586-longest-subarray-of-1s-after-deleting-one-element
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1849-maximum-absolute-sum-of-any-subarray
2017-minimum-number-of-flips-to-make-the-binary-string-alternating
2067-maximum-number-of-points-with-cost
2262-solving-questions-with-brainpower
2882-ways-to-express-an-integer-as-sum-of-powers
3490-find-the-maximum-length-of-valid-subsequence-i
3648-find-the-maximum-number-of-fruits-collected

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0264-ugly-number-ii
0451-sort-characters-by-frequency
1127-last-stone-weight
1325-path-with-maximum-probability
1397-search-suggestions-system
1478-maximum-number-of-events-that-can-be-attended
2054-the-number-of-the-smallest-unoccupied-chair
2204-find-subsequence-of-length-k-with-the-largest-sum
2413-smallest-number-in-infinite-set
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2553-total-cost-to-hire-k-workers
2636-maximum-subsequence-score
2681-put-marbles-in-bags
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
3332-minimum-operations-to-exceed-threshold-value-ii
3555-final-array-state-after-k-multiplication-operations-i

Brainteaser

1086-divisor-game
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
3462-vowels-game-in-a-string

Game Theory

1086-divisor-game
3462-vowels-game-in-a-string

Stack

0020-valid-parentheses
0032-longest-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0143-reorder-list
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0394-decode-string
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0678-valid-parenthesis-string
0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0937-online-stock-span
1078-remove-outermost-parentheses
1570-final-prices-with-a-special-discount-in-a-shop
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1737-maximum-nesting-depth-of-the-parentheses
1818-maximum-score-from-removing-substrings
2221-check-if-a-parentheses-string-can-be-valid
2227-sum-of-subarray-ranges
2307-replace-non-coprime-numbers-in-array
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Geometry

0149-max-points-on-a-line
0830-largest-triangle-area
0919-projection-area-of-3d-shapes

Matrix

0036-valid-sudoku
0037-sudoku-solver
0048-rotate-image
0054-spiral-matrix
0059-spiral-matrix-ii
0063-unique-paths-ii
0064-minimum-path-sum
0074-search-a-2d-matrix
0919-projection-area-of-3d-shapes
0967-minimum-falling-path-sum
1036-rotting-oranges
1147-flip-columns-for-maximum-number-of-equal-rows
1396-count-servers-that-communicate
1972-rotating-the-box
2038-nearest-exit-from-entrance-in-maze
2132-convert-1d-array-into-2d-array
2244-number-of-laser-beams-in-a-bank
2343-count-unguarded-cells-in-the-grid
2685-first-completely-painted-row-or-column
3330-modify-the-matrix
3648-find-the-maximum-number-of-fruits-collected

Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0437-path-sum-iii
0450-delete-node-in-a-bst
0515-find-largest-value-in-each-tree-row
0774-maximum-depth-of-n-ary-tree
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1474-longest-zigzag-path-in-a-binary-tree
1544-count-good-nodes-in-binary-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0104-maximum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0386-lexicographical-numbers
0437-path-sum-iii
0515-find-largest-value-in-each-tree-row
0547-number-of-provinces
0774-maximum-depth-of-n-ary-tree
0871-keys-and-rooms
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1350-remove-sub-folders-from-the-filesystem
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1474-longest-zigzag-path-in-a-binary-tree
1544-count-good-nodes-in-binary-tree
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Binary Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0437-path-sum-iii
0450-delete-node-in-a-bst
0515-find-largest-value-in-each-tree-row
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1474-longest-zigzag-path-in-a-binary-tree
1544-count-good-nodes-in-binary-tree

Breadth-First Search

0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0199-binary-tree-right-side-view
0322-coin-change
0515-find-largest-value-in-each-tree-row
0547-number-of-provinces
0774-maximum-depth-of-n-ary-tree
0871-keys-and-rooms
1036-rotting-oranges
1116-maximum-level-sum-of-a-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1544-count-good-nodes-in-binary-tree
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero
2038-nearest-exit-from-entrance-in-maze

Enumeration

0204-count-primes
0900-reordered-power-of-2
1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2174-next-greater-numerically-balanced-number
2870-longest-alternating-subarray
2998-count-symmetric-integers
4055-longest-balanced-substring-i

Graph

0547-number-of-provinces
0871-keys-and-rooms
1325-path-with-maximum-probability
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero
2220-find-all-possible-recipes-from-given-supplies

Shortest Path

1325-path-with-maximum-probability

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0023-merge-k-sorted-lists
0024-swap-nodes-in-pairs
0025-reverse-nodes-in-k-group
0061-rotate-list
0082-remove-duplicates-from-sorted-list-ii
0086-partition-list
0092-reverse-linked-list-ii
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0859-design-circular-deque
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
2216-delete-the-middle-node-of-a-linked-list
2299-merge-nodes-in-between-zeros
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0024-swap-nodes-in-pairs
0025-reverse-nodes-in-k-group
0044-wildcard-matching
0050-powx-n
0060-permutation-sequence
0143-reorder-list
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0326-power-of-three
0342-power-of-four
0394-decode-string
1013-fibonacci-number
2050-count-good-numbers
3600-find-the-k-th-character-in-string-game-i

Sliding Window

0003-longest-substring-without-repeating-characters
0030-substring-with-concatenation-of-all-words
0076-minimum-window-substring
0424-longest-repeating-character-replacement
0567-permutation-in-string
0594-longest-harmonious-subsequence
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
1460-number-of-substrings-containing-all-three-characters
1538-maximum-points-you-can-obtain-from-cards
1586-longest-subarray-of-1s-after-deleting-one-element
1755-defuse-the-bomb
1813-maximum-erasure-value
1966-frequency-of-the-most-frequent-element
2017-minimum-number-of-flips-to-make-the-binary-string-alternating
2394-count-subarrays-with-score-less-than-k
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2478-longest-nice-subarray
2552-maximum-sum-of-distinct-subarrays-with-length-k
2626-count-the-number-of-good-subarrays
2856-count-complete-subarrays-in-an-array
2866-longest-even-odd-subarray-with-threshold
2891-maximum-beauty-of-an-array-after-applying-operation
3193-maximum-strong-pair-xor-i
3213-count-subarrays-where-max-element-appears-at-least-k-times
3267-find-longest-special-substring-that-occurs-thrice-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Prefix Sum

0560-subarray-sum-equals-k
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1435-xor-queries-of-a-subarray
1477-product-of-the-last-k-numbers
1537-maximum-score-after-splitting-a-string
1538-maximum-points-you-can-obtain-from-cards
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1966-frequency-of-the-most-frequent-element
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2358-number-of-ways-to-split-array
2394-count-subarrays-with-score-less-than-k
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges
3383-taking-maximum-energy-from-the-mystic-dungeon
3427-special-array-ii
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3639-zero-array-transformation-i
4052-equal-score-substrings

Trie

0014-longest-common-prefix
0208-implement-trie-prefix-tree
0386-lexicographical-numbers
1350-remove-sub-folders-from-the-filesystem
1397-search-suggestions-system
3193-maximum-strong-pair-xor-i
3309-count-prefix-and-suffix-pairs-i

Number Theory

0204-count-primes
2307-replace-non-coprime-numbers-in-array
2903-insert-greatest-common-divisors-in-linked-list
3768-check-if-digits-are-equal-in-string-after-operations-i

Divide and Conquer

0023-merge-k-sorted-lists
0053-maximum-subarray
0169-majority-element
0215-kth-largest-element-in-an-array
0493-reverse-pairs

Design

0155-min-stack
0208-implement-trie-prefix-tree
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0859-design-circular-deque
0937-online-stock-span
1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers
1995-finding-pairs-with-a-certain-sum
2413-smallest-number-in-infinite-set

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0859-design-circular-deque
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

String Matching

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

Union Find

0128-longest-consecutive-sequence
0547-number-of-provinces
1396-count-servers-that-communicate

Bucket Sort

0451-sort-characters-by-frequency

Binary Indexed Tree

0493-reverse-pairs

Segment Tree

0493-reverse-pairs
3790-fruits-into-baskets-ii

Merge Sort

0023-merge-k-sorted-lists
0493-reverse-pairs

Ordered Set

0493-reverse-pairs
2413-smallest-number-in-infinite-set
3790-fruits-into-baskets-ii

Memoization

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

Combinatorics

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

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
0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0780-max-chunks-to-make-sorted
0937-online-stock-span
1570-final-prices-with-a-special-discount-in-a-shop
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
2227-sum-of-subarray-ranges

Binary Search Tree

0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0450-delete-node-in-a-bst
0783-search-in-a-binary-search-tree

Quickselect

0215-kth-largest-element-in-an-array

Interactive

0374-guess-number-higher-or-lower

Data Stream

0937-online-stock-span
1477-product-of-the-last-k-numbers

Rolling Hash

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

Hash Function

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

Topological Sort

2220-find-all-possible-recipes-from-given-supplies

About

Folder containing solutions to various LeetCode problems, showcasing my problem-solving skills and progress in algorithmic challenges.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published