Skip to content

karygauss03/Leetcode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode-Solutions

My Leetcode Solutions This is my Leetcode profile https://leetcode.com/karygauss03/

LeetCode Topics

Array

0174-dungeon-game
0689-maximum-sum-of-3-non-overlapping-subarrays
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0854-making-a-large-island
0892-shortest-subarray-with-sum-at-least-k
0905-length-of-longest-fibonacci-subsequence
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0952-word-subsets
1025-minimum-cost-for-tickets
1032-satisfiability-of-equality-equations
1130-last-stone-weight-ii
1147-flip-columns-for-maximum-number-of-equal-rows
1308-smallest-string-with-swaps
1335-maximum-candies-allocated-to-k-children
1396-count-servers-that-communicate
1468-check-if-n-and-its-double-exist
1477-product-of-the-last-k-numbers
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1524-string-matching-in-an-array
1631-number-of-sub-arrays-with-odd-sum
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1815-checking-existence-of-edge-length-limited-paths
1849-maximum-absolute-sum-of-any-subarray
1876-map-of-highest-peak
1878-check-if-array-is-sorted-and-rotated
1886-minimum-limit-of-balls-in-a-bag
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1917-maximum-average-pass-ratio
1927-maximum-ascending-subarray-sum
2051-longest-common-subpath
2107-find-unique-binary-string
2145-grid-game
2188-minimized-maximum-of-products-distributed-to-any-store
2220-find-all-possible-recipes-from-given-supplies
2229-maximum-fruits-harvested-after-at-most-k-steps
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2343-count-unguarded-cells-in-the-grid
2358-number-of-ways-to-split-array
2375-minimum-obstacle-removal-to-reach-corner
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2533-bitwise-xor-of-all-pairings
2640-maximum-number-of-integers-to-choose-from-a-range-i
2685-first-completely-painted-row-or-column
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2764-maximum-number-of-fish-in-a-grid
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
2832-find-the-longest-equal-subarray
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3219-make-lexicographically-smallest-array-by-swapping-elements
3309-count-prefix-and-suffix-pairs-i
3332-minimum-operations-to-exceed-threshold-value-ii
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3427-special-array-ii
3429-special-array-i
3434-find-the-number-of-distinct-colors-among-the-balls
3522-find-the-power-of-k-size-subarrays-i
3555-final-array-state-after-k-multiplication-operations-i
3651-transformed-array
3653-maximum-subarray-sum-with-length-divisible-by-k
3680-count-connected-components-in-lcm-graph
3681-maximum-area-rectangle-with-point-constraints-i

Math

0292-nim-game
1477-product-of-the-last-k-numbers
1631-number-of-sub-arrays-with-odd-sum
2649-count-total-number-of-colored-cells
2716-prime-subtraction-operation
3555-final-array-state-after-k-multiplication-operations-i
3655-digit-operations-to-make-two-integers-equal
3680-count-connected-components-in-lcm-graph
3681-maximum-area-rectangle-with-point-constraints-i

Binary Search

0892-shortest-subarray-with-sum-at-least-k
1335-maximum-candies-allocated-to-k-children
1468-check-if-n-and-its-double-exist
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1886-minimum-limit-of-balls-in-a-bag
2051-longest-common-subpath
2188-minimized-maximum-of-products-distributed-to-any-store
2229-maximum-fruits-harvested-after-at-most-k-steps
2640-maximum-number-of-integers-to-choose-from-a-range-i
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2832-find-the-longest-equal-subarray
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii

Greedy

0780-max-chunks-to-make-sorted
1502-construct-k-palindrome-strings
1917-maximum-average-pass-ratio
2221-check-if-a-parentheses-string-can-be-valid
2300-construct-string-with-repeat-limit
2456-construct-smallest-number-from-di-string
2509-minimize-xor
2640-maximum-number-of-integers-to-choose-from-a-range-i
2716-prime-subtraction-operation

Number Theory

2716-prime-subtraction-operation
3655-digit-operations-to-make-two-integers-equal
3680-count-connected-components-in-lcm-graph

Two Pointers

1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1815-checking-existence-of-edge-length-limited-paths
2232-adding-spaces-to-a-string
2699-count-the-number-of-fair-pairs
3018-make-string-a-subsequence-using-cyclic-increments

Sorting

0780-max-chunks-to-make-sorted
1308-smallest-string-with-swaps
1468-check-if-n-and-its-double-exist
1815-checking-existence-of-edge-length-limited-paths
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2640-maximum-number-of-integers-to-choose-from-a-range-i
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2891-maximum-beauty-of-an-array-after-applying-operation
3219-make-lexicographically-smallest-array-by-swapping-elements
3681-maximum-area-rectangle-with-point-constraints-i

Stack

0780-max-chunks-to-make-sorted
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2221-check-if-a-parentheses-string-can-be-valid
2456-construct-smallest-number-from-di-string
3181-find-building-where-alice-and-bob-can-meet
3447-clear-digits

Monotonic Stack

0780-max-chunks-to-make-sorted
1679-shortest-subarray-to-be-removed-to-make-array-sorted
3181-find-building-where-alice-and-bob-can-meet

Sliding Window

0892-shortest-subarray-with-sum-at-least-k
2229-maximum-fruits-harvested-after-at-most-k-steps
2599-take-k-of-each-character-from-left-and-right
2832-find-the-longest-equal-subarray
2891-maximum-beauty-of-an-array-after-applying-operation
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
3522-find-the-power-of-k-size-subarrays-i

Dynamic Programming

0174-dungeon-game
0689-maximum-sum-of-3-non-overlapping-subarrays
0905-length-of-longest-fibonacci-subsequence
1025-minimum-cost-for-tickets
1130-last-stone-weight-ii
1170-shortest-common-supersequence
1631-number-of-sub-arrays-with-odd-sum
1849-maximum-absolute-sum-of-any-subarray
2562-count-ways-to-build-good-strings

Queue

0892-shortest-subarray-with-sum-at-least-k

Heap (Priority Queue)

0892-shortest-subarray-with-sum-at-least-k
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1917-maximum-average-pass-ratio
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
3181-find-building-where-alice-and-bob-can-meet
3332-minimum-operations-to-exceed-threshold-value-ii
3555-final-array-state-after-k-multiplication-operations-i
3655-digit-operations-to-make-two-integers-equal

Prefix Sum

0892-shortest-subarray-with-sum-at-least-k
1477-product-of-the-last-k-numbers
1537-maximum-score-after-splitting-a-string
1631-number-of-sub-arrays-with-odd-sum
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
2145-grid-game
2229-maximum-fruits-harvested-after-at-most-k-steps
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges
3427-special-array-ii
3653-maximum-subarray-sum-with-length-divisible-by-k

Monotonic Queue

0892-shortest-subarray-with-sum-at-least-k

Matrix

0174-dungeon-game
0787-sliding-puzzle
0854-making-a-large-island
1147-flip-columns-for-maximum-number-of-equal-rows
1396-count-servers-that-communicate
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1876-map-of-highest-peak
2145-grid-game
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2685-first-completely-painted-row-or-column
2764-maximum-number-of-fish-in-a-grid

Hash Table

0905-length-of-longest-fibonacci-subsequence
0925-construct-binary-tree-from-preorder-and-postorder-traversal
0952-word-subsets
1147-flip-columns-for-maximum-number-of-equal-rows
1160-letter-tile-possibilities
1218-lowest-common-ancestor-of-deepest-leaves
1308-smallest-string-with-swaps
1387-find-elements-in-a-contaminated-binary-tree
1468-check-if-n-and-its-double-exist
1502-construct-k-palindrome-strings
1915-check-if-one-string-swap-can-make-strings-equal
2059-unique-length-3-palindromic-subsequences
2107-find-unique-binary-string
2220-find-all-possible-recipes-from-given-supplies
2300-construct-string-with-repeat-limit
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2599-take-k-of-each-character-from-left-and-right
2640-maximum-number-of-integers-to-choose-from-a-range-i
2685-first-completely-painted-row-or-column
2695-find-score-of-an-array-after-marking-all-elements
2766-find-the-prefix-common-array-of-two-arrays
2832-find-the-longest-equal-subarray
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
3434-find-the-number-of-distinct-colors-among-the-balls
3455-minimum-length-of-string-after-operations
3653-maximum-subarray-sum-with-length-divisible-by-k
3680-count-connected-components-in-lcm-graph

String

0952-word-subsets
1032-satisfiability-of-equality-equations
1058-lexicographically-smallest-equivalent-string
1093-recover-a-tree-from-preorder-traversal
1160-letter-tile-possibilities
1170-shortest-common-supersequence
1308-smallest-string-with-swaps
1502-construct-k-palindrome-strings
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
2059-unique-length-3-palindromic-subsequences
2107-find-unique-binary-string
2220-find-all-possible-recipes-from-given-supplies
2221-check-if-a-parentheses-string-can-be-valid
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2300-construct-string-with-repeat-limit
2456-construct-smallest-number-from-di-string
2465-shifting-letters-ii
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
3018-make-string-a-subsequence-using-cyclic-increments
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
3309-count-prefix-and-suffix-pairs-i
3447-clear-digits
3455-minimum-length-of-string-after-operations

Simulation

2232-adding-spaces-to-a-string
2343-count-unguarded-cells-in-the-grid
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
3434-find-the-number-of-distinct-colors-among-the-balls
3447-clear-digits
3555-final-array-state-after-k-multiplication-operations-i
3651-transformed-array

Breadth-First Search

0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0787-sliding-puzzle
0820-find-eventual-safe-states
0854-making-a-large-island
1218-lowest-common-ancestor-of-deepest-leaves
1308-smallest-string-with-swaps
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1442-number-of-operations-to-make-network-connected
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1876-map-of-highest-peak
2375-minimum-obstacle-removal-to-reach-corner
2493-reverse-odd-levels-of-binary-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2764-maximum-number-of-fish-in-a-grid
3439-find-minimum-diameter-after-merging-two-trees

Graph

0332-reconstruct-itinerary
0684-redundant-connection
0820-find-eventual-safe-states
1032-satisfiability-of-equality-equations
1442-number-of-operations-to-make-network-connected
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1815-checking-existence-of-edge-length-limited-paths
2201-valid-arrangement-of-pairs
2220-find-all-possible-recipes-from-given-supplies
2246-maximum-employees-to-be-invited-to-a-meeting
2375-minimum-obstacle-removal-to-reach-corner
2583-divide-nodes-into-the-maximum-number-of-groups
3189-find-champion-ii
3439-find-minimum-diameter-after-merging-two-trees
3655-digit-operations-to-make-two-integers-equal

Shortest Path

1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
2375-minimum-obstacle-removal-to-reach-corner
3655-digit-operations-to-make-two-integers-equal

Depth-First Search

0332-reconstruct-itinerary
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0820-find-eventual-safe-states
0854-making-a-large-island
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
1308-smallest-string-with-swaps
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1442-number-of-operations-to-make-network-connected
1558-course-schedule-iv
2201-valid-arrangement-of-pairs
2246-maximum-employees-to-be-invited-to-a-meeting
2493-reverse-odd-levels-of-binary-tree
2764-maximum-number-of-fish-in-a-grid
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Eulerian Circuit

0332-reconstruct-itinerary
2201-valid-arrangement-of-pairs

Rolling Hash

2051-longest-common-subpath
3309-count-prefix-and-suffix-pairs-i

Suffix Array

2051-longest-common-subpath

Hash Function

2051-longest-common-subpath
3309-count-prefix-and-suffix-pairs-i

String Matching

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

Brainteaser

0292-nim-game
2533-bitwise-xor-of-all-pairings

Game Theory

0292-nim-game

Counting

1160-letter-tile-possibilities
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1915-check-if-one-string-swap-can-make-strings-equal
2300-construct-string-with-repeat-limit
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations

Tree

0515-find-largest-value-in-each-tree-row
0925-construct-binary-tree-from-preorder-and-postorder-traversal
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
2493-reverse-odd-levels-of-binary-tree
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Binary Tree

0515-find-largest-value-in-each-tree-row
0925-construct-binary-tree-from-preorder-and-postorder-traversal
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
2493-reverse-odd-levels-of-binary-tree

Binary Indexed Tree

3181-find-building-where-alice-and-bob-can-meet
3681-maximum-area-rectangle-with-point-constraints-i

Segment Tree

3181-find-building-where-alice-and-bob-can-meet
3681-maximum-area-rectangle-with-point-constraints-i

Union Find

0684-redundant-connection
0854-making-a-large-island
1032-satisfiability-of-equality-equations
1058-lexicographically-smallest-equivalent-string
1308-smallest-string-with-swaps
1396-count-servers-that-communicate
1442-number-of-operations-to-make-network-connected
1815-checking-existence-of-edge-length-limited-paths
2583-divide-nodes-into-the-maximum-number-of-groups
2764-maximum-number-of-fish-in-a-grid
3219-make-lexicographically-smallest-array-by-swapping-elements
3680-count-connected-components-in-lcm-graph

Geometry

3681-maximum-area-rectangle-with-point-constraints-i

Enumeration

3681-maximum-area-rectangle-with-point-constraints-i

Bit Manipulation

2059-unique-length-3-palindromic-subsequences
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor

Trie

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

Topological Sort

0820-find-eventual-safe-states
1558-course-schedule-iv
2220-find-all-possible-recipes-from-given-supplies
2246-maximum-employees-to-be-invited-to-a-meeting

Design

1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers

Data Stream

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

Backtracking

1160-letter-tile-possibilities
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
2107-find-unique-binary-string
2456-construct-smallest-number-from-di-string

Divide and Conquer

0925-construct-binary-tree-from-preorder-and-postorder-traversal
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy