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
0892-shortest-subarray-with-sum-at-least-k
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
1468-check-if-n-and-its-double-exist
1524-string-matching-in-an-array
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1815-checking-existence-of-edge-length-limited-paths
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
2051-longest-common-subpath
2188-minimized-maximum-of-products-distributed-to-any-store
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
2640-maximum-number-of-integers-to-choose-from-a-range-i
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
2832-find-the-longest-equal-subarray
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3309-count-prefix-and-suffix-pairs-i
3427-special-array-ii
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
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
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
1917-maximum-average-pass-ratio
2300-construct-string-with-repeat-limit
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
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
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
3181-find-building-where-alice-and-bob-can-meet

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
1025-minimum-cost-for-tickets
1130-last-stone-weight-ii
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
1917-maximum-average-pass-ratio
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
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
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
1537-maximum-score-after-splitting-a-string
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
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
1147-flip-columns-for-maximum-number-of-equal-rows
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner

Hash Table

0952-word-subsets
1147-flip-columns-for-maximum-number-of-equal-rows
1308-smallest-string-with-swaps
1468-check-if-n-and-its-double-exist
2059-unique-length-3-palindromic-subsequences
2300-construct-string-with-repeat-limit
2599-take-k-of-each-character-from-left-and-right
2640-maximum-number-of-integers-to-choose-from-a-range-i
2695-find-score-of-an-array-after-marking-all-elements
2832-find-the-longest-equal-subarray
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i
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
1308-smallest-string-with-swaps
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
2059-unique-length-3-palindromic-subsequences
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2300-construct-string-with-repeat-limit
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

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
3555-final-array-state-after-k-multiplication-operations-i
3651-transformed-array

Breadth-First Search

0515-find-largest-value-in-each-tree-row
0787-sliding-puzzle
1308-smallest-string-with-swaps
1442-number-of-operations-to-make-network-connected
2375-minimum-obstacle-removal-to-reach-corner
2493-reverse-odd-levels-of-binary-tree
3439-find-minimum-diameter-after-merging-two-trees

Graph

0332-reconstruct-itinerary
1032-satisfiability-of-equality-equations
1442-number-of-operations-to-make-network-connected
1815-checking-existence-of-edge-length-limited-paths
2201-valid-arrangement-of-pairs
2375-minimum-obstacle-removal-to-reach-corner
3189-find-champion-ii
3439-find-minimum-diameter-after-merging-two-trees
3655-digit-operations-to-make-two-integers-equal

Shortest Path

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
1308-smallest-string-with-swaps
1442-number-of-operations-to-make-network-connected
2201-valid-arrangement-of-pairs
2493-reverse-odd-levels-of-binary-tree
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

Game Theory

0292-nim-game

Counting

2300-construct-string-with-repeat-limit
3266-find-longest-special-substring-that-occurs-thrice-ii
3267-find-longest-special-substring-that-occurs-thrice-i

Tree

0515-find-largest-value-in-each-tree-row
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
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

1032-satisfiability-of-equality-equations
1058-lexicographically-smallest-equivalent-string
1308-smallest-string-with-swaps
1442-number-of-operations-to-make-network-connected
1815-checking-existence-of-edge-length-limited-paths
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

Trie

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