Skip to content

tesfaymebre/A2SV_comptetive_programming-python-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Depth-First Search

0515-find-largest-value-in-each-tree-row
0744-network-delay-time
0803-cheapest-flights-within-k-stops
0988-flip-equivalent-binary-trees
1350-remove-sub-folders-from-the-filesystem
2493-reverse-odd-levels-of-binary-tree
2677-cousins-in-binary-tree-ii
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Breadth-First Search

0515-find-largest-value-in-each-tree-row
0744-network-delay-time
0803-cheapest-flights-within-k-stops
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
2711-minimum-time-to-visit-a-cell-in-a-grid
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i

Graph

0744-network-delay-time
0803-cheapest-flights-within-k-stops
1325-path-with-maximum-probability
2711-minimum-time-to-visit-a-cell-in-a-grid
3189-find-champion-ii
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i

Heap (Priority Queue)

0632-smallest-range-covering-elements-from-k-lists
0744-network-delay-time
0803-cheapest-flights-within-k-stops
1304-longest-happy-string
1325-path-with-maximum-probability
1917-maximum-average-pass-ratio
2054-the-number-of-the-smallest-unoccupied-chair
2164-two-best-non-overlapping-events
2300-construct-string-with-repeat-limit
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2711-minimum-time-to-visit-a-cell-in-a-grid
2868-continuous-subarrays
3555-final-array-state-after-k-multiplication-operations-i

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops
1325-path-with-maximum-probability
2711-minimum-time-to-visit-a-cell-in-a-grid

Dynamic Programming

0062-unique-paths
0494-target-sum
0689-maximum-sum-of-3-non-overlapping-subarrays
0803-cheapest-flights-within-k-stops
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1402-count-square-submatrices-with-all-ones
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1766-minimum-number-of-removals-to-make-mountain-array
2164-two-best-non-overlapping-events
2187-vowels-of-all-substrings
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2794-maximum-number-of-moves-in-a-grid

String

0028-find-the-index-of-the-first-occurrence-in-a-string
0468-validate-ip-address
0686-repeated-string-match
0812-rotate-string
0957-minimum-add-to-make-parentheses-valid
1197-parsing-a-boolean-expression
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1350-remove-sub-folders-from-the-filesystem
1508-longest-happy-prefix
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1667-find-kth-bit-in-nth-binary-string
1715-split-a-string-into-the-max-number-of-unique-substrings
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
2187-vowels-of-all-substrings
2232-adding-spaces-to-a-string
2300-construct-string-with-repeat-limit
2414-move-pieces-to-obtain-a-string
2580-circular-sentence
2594-count-pairs-of-similar-strings
2599-take-k-of-each-character-from-left-and-right
3018-make-string-a-subsequence-using-cyclic-increments
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3195-separate-black-and-white-balls
3267-find-longest-special-substring-that-occurs-thrice-i

Stack

0780-max-chunks-to-make-sorted
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1197-parsing-a-boolean-expression
1570-final-prices-with-a-special-discount-in-a-shop

Greedy

0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0780-max-chunks-to-make-sorted
0957-minimum-add-to-make-parentheses-valid
1304-longest-happy-string
1766-minimum-number-of-removals-to-make-mountain-array
1917-maximum-average-pass-ratio
2300-construct-string-with-repeat-limit
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2716-prime-subtraction-operation
3195-separate-black-and-white-balls

Array

0307-range-sum-query-mutable
0494-target-sum
0632-smallest-range-covering-elements-from-k-lists
0689-maximum-sum-of-3-non-overlapping-subarrays
0780-max-chunks-to-make-sorted
1002-maximum-width-ramp
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1325-path-with-maximum-probability
1350-remove-sub-folders-from-the-filesystem
1402-count-square-submatrices-with-all-ones
1468-check-if-n-and-its-double-exist
1570-final-prices-with-a-special-discount-in-a-shop
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1766-minimum-number-of-removals-to-make-mountain-array
1886-minimum-limit-of-balls-in-a-bag
1917-maximum-average-pass-ratio
2054-the-number-of-the-smallest-unoccupied-chair
2164-two-best-non-overlapping-events
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2232-adding-spaces-to-a-string
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2488-divide-intervals-into-minimum-number-of-groups
2552-maximum-sum-of-distinct-subarrays-with-length-k
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2594-count-pairs-of-similar-strings
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2711-minimum-time-to-visit-a-cell-in-a-grid
2716-prime-subtraction-operation
2794-maximum-number-of-moves-in-a-grid
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3291-find-if-array-can-be-sorted
3427-special-array-ii
3438-peaks-in-array
3517-shortest-distance-after-road-addition-queries-i
3555-final-array-state-after-k-multiplication-operations-i

Monotonic Stack

0780-max-chunks-to-make-sorted
1002-maximum-width-ramp
1570-final-prices-with-a-special-discount-in-a-shop

Hash Table

0632-smallest-range-covering-elements-from-k-lists
1468-check-if-n-and-its-double-exist
1715-split-a-string-into-the-max-number-of-unique-substrings
2054-the-number-of-the-smallest-unoccupied-chair
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2552-maximum-sum-of-distinct-subarrays-with-length-k
2586-longest-square-streak-in-an-array
2594-count-pairs-of-similar-strings
2599-take-k-of-each-character-from-left-and-right
2640-maximum-number-of-integers-to-choose-from-a-range-i
2677-cousins-in-binary-tree-ii
2695-find-score-of-an-array-after-marking-all-elements
3267-find-longest-special-substring-that-occurs-thrice-i

Two Pointers

0028-find-the-index-of-the-first-occurrence-in-a-string
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
2232-adding-spaces-to-a-string
2414-move-pieces-to-obtain-a-string
2488-divide-intervals-into-minimum-number-of-groups
2699-count-the-number-of-fair-pairs
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

Sorting

0632-smallest-range-covering-elements-from-k-lists
0780-max-chunks-to-make-sorted
1468-check-if-n-and-its-double-exist
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2488-divide-intervals-into-minimum-number-of-groups
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2640-maximum-number-of-integers-to-choose-from-a-range-i
2646-kth-largest-sum-in-a-binary-tree
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
3291-find-if-array-can-be-sorted

Prefix Sum

1537-maximum-score-after-splitting-a-string
2358-number-of-ways-to-split-array
2488-divide-intervals-into-minimum-number-of-groups
3427-special-array-ii

Sliding Window

0632-smallest-range-covering-elements-from-k-lists
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3267-find-longest-special-substring-that-occurs-thrice-i

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0686-repeated-string-match
0812-rotate-string
1508-longest-happy-prefix
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Math

0050-powx-n
0062-unique-paths
0670-maximum-swap
2050-count-good-numbers
2187-vowels-of-all-substrings
2716-prime-subtraction-operation
3555-final-array-state-after-k-multiplication-operations-i

Recursion

0050-powx-n
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string
2050-count-good-numbers

Combinatorics

0062-unique-paths
2187-vowels-of-all-substrings

Backtracking

0494-target-sum
1715-split-a-string-into-the-max-number-of-unique-substrings
2170-count-number-of-maximum-bitwise-or-subsets

Bit Manipulation

2170-count-number-of-maximum-bitwise-or-subsets
2356-largest-combination-with-bitwise-and-greater-than-zero
2594-count-pairs-of-similar-strings
3291-find-if-array-can-be-sorted

Enumeration

2170-count-number-of-maximum-bitwise-or-subsets

Simulation

1667-find-kth-bit-in-nth-binary-string
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

Tree

0515-find-largest-value-in-each-tree-row
0988-flip-equivalent-binary-trees
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
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
0988-flip-equivalent-binary-trees
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Rolling Hash

1508-longest-happy-prefix

Hash Function

1508-longest-happy-prefix

Trie

1350-remove-sub-folders-from-the-filesystem

Matrix

1402-count-square-submatrices-with-all-ones
2343-count-unguarded-cells-in-the-grid
2711-minimum-time-to-visit-a-cell-in-a-grid
2794-maximum-number-of-moves-in-a-grid

Binary Search

1468-check-if-n-and-its-double-exist
1766-minimum-number-of-removals-to-make-mountain-array
1886-minimum-limit-of-balls-in-a-bag
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2586-longest-square-streak-in-an-array
2640-maximum-number-of-integers-to-choose-from-a-range-i
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2891-maximum-beauty-of-an-array-after-applying-operation
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii

Design

0307-range-sum-query-mutable

Binary Indexed Tree

0307-range-sum-query-mutable
3438-peaks-in-array

Segment Tree

0307-range-sum-query-mutable
3438-peaks-in-array

Counting

2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2594-count-pairs-of-similar-strings
3267-find-longest-special-substring-that-occurs-thrice-i

Number Theory

2716-prime-subtraction-operation

Queue

2868-continuous-subarrays

Ordered Set

2868-continuous-subarrays

Monotonic Queue

2868-continuous-subarrays

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published