Skip to content

Fasikagebrehana/competitive-programming

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

Greedy

0055-jump-game
0316-remove-duplicate-letters
0605-can-place-flowers
0624-maximum-distance-in-arrays
0649-dota2-senate
0890-lemonade-change
0917-boats-to-save-people
0957-minimum-add-to-make-parentheses-valid
1026-string-without-aaa-or-bbb
1139-previous-permutation-with-one-swap
1304-longest-happy-string
1341-split-a-string-in-balanced-strings
1502-construct-k-palindrome-strings
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1966-frequency-of-the-most-frequent-element
2095-minimum-number-of-swaps-to-make-the-string-balanced
2221-check-if-a-parentheses-string-can-be-valid
2300-construct-string-with-repeat-limit
2379-maximum-total-importance-of-roads
2497-maximum-matching-of-players-with-trainers
2616-maximal-score-after-applying-k-operations
2715-k-items-with-the-maximum-sum
2716-prime-subtraction-operation
3195-separate-black-and-white-balls

Graph

0329-longest-increasing-path-in-a-matrix
0684-redundant-connection
0744-network-delay-time
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
1325-path-with-maximum-probability
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2176-parallel-courses-iii
2220-find-all-possible-recipes-from-given-supplies
2375-minimum-obstacle-removal-to-reach-corner
2379-maximum-total-importance-of-roads
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2439-longest-cycle-in-a-graph
2711-minimum-time-to-visit-a-cell-in-a-grid
3517-shortest-distance-after-road-addition-queries-i

Sorting

0056-merge-intervals
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0539-minimum-time-difference
0917-boats-to-save-people
0948-sort-an-array
1256-rank-transform-of-an-array
1308-smallest-string-with-swaps
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1675-magnetic-force-between-two-balls
1730-special-array-with-x-elements-greater-than-or-equal-x
1752-arithmetic-subarrays
1966-frequency-of-the-most-frequent-element
2179-most-beautiful-item-for-each-query
2210-find-target-indices-after-sorting-array
2379-maximum-total-importance-of-roads
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2497-maximum-matching-of-players-with-trainers
2581-divide-players-into-teams-of-equal-skill
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
3291-find-if-array-can-be-sorted

Heap (Priority Queue)

0264-ugly-number-ii
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0744-network-delay-time
0803-cheapest-flights-within-k-stops
0948-sort-an-array
1304-longest-happy-string
1325-path-with-maximum-probability
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2379-maximum-total-importance-of-roads
2413-smallest-number-in-infinite-set
2473-max-sum-of-a-pair-with-equal-sum-of-digits
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
3332-minimum-operations-to-exceed-threshold-value-ii
3555-final-array-state-after-k-multiplication-operations-i

Two Pointers

0042-trapping-rain-water
0125-valid-palindrome
0142-linked-list-cycle-ii
0143-reorder-list
0392-is-subsequence
0443-string-compression
0874-backspace-string-compare
0917-boats-to-save-people
0961-long-pressed-name
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1615-range-sum-of-sorted-subarray-sums
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2497-maximum-matching-of-players-with-trainers
2581-divide-players-into-teams-of-equal-skill
2699-count-the-number-of-fair-pairs
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

String

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0125-valid-palindrome
0187-repeated-dna-sequences
0316-remove-duplicate-letters
0318-maximum-product-of-word-lengths
0392-is-subsequence
0443-string-compression
0539-minimum-time-difference
0648-replace-words
0649-dota2-senate
0874-backspace-string-compare
0920-uncommon-words-from-two-sentences
0957-minimum-add-to-make-parentheses-valid
0961-long-pressed-name
1026-string-without-aaa-or-bbb
1058-lexicographically-smallest-equivalent-string
1146-greatest-common-divisor-of-strings
1304-longest-happy-string
1308-smallest-string-with-swaps
1320-remove-all-adjacent-duplicates-in-string-ii
1341-split-a-string-in-balanced-strings
1502-construct-k-palindrome-strings
1512-design-underground-system
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
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1667-find-kth-bit-in-nth-binary-string
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1915-check-if-one-string-swap-can-make-strings-equal
1923-sentence-similarity-iii
2021-remove-all-occurrences-of-a-substring
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2095-minimum-number-of-swaps-to-make-the-string-balanced
2134-maximize-the-confusion-of-an-exam
2163-kth-distinct-string-in-an-array
2220-find-all-possible-recipes-from-given-supplies
2221-check-if-a-parentheses-string-can-be-valid
2232-adding-spaces-to-a-string
2243-check-if-all-as-appears-before-all-bs
2292-counting-words-with-a-given-prefix
2300-construct-string-with-repeat-limit
2465-shifting-letters-ii
2470-removing-stars-from-a-string
2580-circular-sentence
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
2800-minimum-string-length-after-removing-substrings
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
3309-count-prefix-and-suffix-pairs-i
3412-permutation-difference-between-two-strings
3447-clear-digits
3455-minimum-length-of-string-after-operations

Array

0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0042-trapping-rain-water
0055-jump-game
0056-merge-intervals
0073-set-matrix-zeroes
0081-search-in-rotated-sorted-array-ii
0200-number-of-islands
0318-maximum-product-of-word-lengths
0329-longest-increasing-path-in-a-matrix
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0380-insert-delete-getrandom-o1
0491-non-decreasing-subsequences
0529-minesweeper
0539-minimum-time-difference
0605-can-place-flowers
0624-maximum-distance-in-arrays
0648-replace-words
0682-baseball-game
0729-my-calendar-i
0735-asteroid-collision
0859-design-circular-deque
0860-design-circular-queue
0882-peak-index-in-a-mountain-array
0890-lemonade-change
0917-boats-to-save-people
0940-fruit-into-baskets
0948-sort-an-array
1002-maximum-width-ramp
1063-best-sightseeing-pair
1139-previous-permutation-with-one-swap
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1308-smallest-string-with-swaps
1310-watering-plants
1325-path-with-maximum-probability
1364-tuple-with-same-product
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1496-lucky-numbers-in-a-matrix
1497-design-a-stack-with-increment-operation
1507-check-if-there-is-a-valid-path-in-a-grid
1524-string-matching-in-an-array
1556-make-two-arrays-equal-by-reversing-subarrays
1570-final-prices-with-a-special-discount-in-a-shop
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1675-magnetic-force-between-two-balls
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1730-special-array-with-x-elements-greater-than-or-equal-x
1752-arithmetic-subarrays
1755-defuse-the-bomb
1772-create-sorted-array-through-instructions
1775-design-an-ordered-stream
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1866-restore-the-array-from-adjacent-pairs
1878-check-if-array-is-sorted-and-rotated
1886-minimum-limit-of-balls-in-a-bag
1923-sentence-similarity-iii
1951-find-the-winner-of-the-circular-game
1966-frequency-of-the-most-frequent-element
2006-find-the-student-that-will-replace-the-chalk
2132-convert-1d-array-into-2d-array
2163-kth-distinct-string-in-an-array
2170-count-number-of-maximum-bitwise-or-subsets
2176-parallel-courses-iii
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2210-find-target-indices-after-sorting-array
2220-find-all-possible-recipes-from-given-supplies
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2375-minimum-obstacle-removal-to-reach-corner
2448-count-number-of-bad-pairs
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2497-maximum-matching-of-players-with-trainers
2513-number-of-pairs-satisfying-inequality
2533-bitwise-xor-of-all-pairings
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2616-maximal-score-after-applying-k-operations
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
2711-minimum-time-to-visit-a-cell-in-a-grid
2716-prime-subtraction-operation
2766-find-the-prefix-common-array-of-two-arrays
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3332-minimum-operations-to-exceed-threshold-value-ii
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3380-shortest-subarray-with-or-at-least-k-ii
3434-find-the-number-of-distinct-colors-among-the-balls
3517-shortest-distance-after-road-addition-queries-i
3522-find-the-power-of-k-size-subarrays-i
3555-final-array-state-after-k-multiplication-operations-i

Binary Search

0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0081-search-in-rotated-sorted-array-ii
0378-kth-smallest-element-in-a-sorted-matrix
0729-my-calendar-i
0755-reach-a-number
0882-peak-index-in-a-mountain-array
1468-check-if-n-and-its-double-exist
1615-range-sum-of-sorted-subarray-sums
1675-magnetic-force-between-two-balls
1730-special-array-with-x-elements-greater-than-or-equal-x
1772-create-sorted-array-through-instructions
1886-minimum-limit-of-balls-in-a-bag
1966-frequency-of-the-most-frequent-element
2006-find-the-student-that-will-replace-the-chalk
2134-maximize-the-confusion-of-an-exam
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2210-find-target-indices-after-sorting-array
2513-number-of-pairs-satisfying-inequality
2628-minimize-the-maximum-of-two-arrays
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
3267-find-longest-special-substring-that-occurs-thrice-i

Depth-First Search

0129-sum-root-to-leaf-numbers
0199-binary-tree-right-side-view
0200-number-of-islands
0230-kth-smallest-element-in-a-bst
0329-longest-increasing-path-in-a-matrix
0386-lexicographical-numbers
0529-minesweeper
0662-maximum-width-of-binary-tree
0684-redundant-connection
0744-network-delay-time
0776-n-ary-tree-postorder-traversal
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
1308-smallest-string-with-swaps
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1507-check-if-there-is-a-valid-path-in-a-grid
1866-restore-the-array-from-adjacent-pairs
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2439-longest-cycle-in-a-graph
2493-reverse-odd-levels-of-binary-tree

Breadth-First Search

0199-binary-tree-right-side-view
0200-number-of-islands
0329-longest-increasing-path-in-a-matrix
0529-minesweeper
0662-maximum-width-of-binary-tree
0684-redundant-connection
0744-network-delay-time
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
1308-smallest-string-with-swaps
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1507-check-if-there-is-a-valid-path-in-a-grid
2375-minimum-obstacle-removal-to-reach-corner
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2493-reverse-odd-levels-of-binary-tree
2646-kth-largest-sum-in-a-binary-tree
2711-minimum-time-to-visit-a-cell-in-a-grid
3517-shortest-distance-after-road-addition-queries-i

Union Find

0200-number-of-islands
0684-redundant-connection
1058-lexicographically-smallest-equivalent-string
1308-smallest-string-with-swaps
1507-check-if-there-is-a-valid-path-in-a-grid
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph

Matrix

0073-set-matrix-zeroes
0200-number-of-islands
0329-longest-increasing-path-in-a-matrix
0378-kth-smallest-element-in-a-sorted-matrix
0529-minesweeper
1496-lucky-numbers-in-a-matrix
1507-check-if-there-is-a-valid-path-in-a-grid
1711-find-valid-matrix-given-row-and-column-sums
2132-convert-1d-array-into-2d-array
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid

Divide and Conquer

0191-number-of-1-bits
0347-top-k-frequent-elements
0948-sort-an-array
1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Binary Indexed Tree

1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Segment Tree

0729-my-calendar-i
1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Merge Sort

0948-sort-an-array
1772-create-sorted-array-through-instructions
2513-number-of-pairs-satisfying-inequality

Ordered Set

0729-my-calendar-i
1772-create-sorted-array-through-instructions
2413-smallest-number-in-infinite-set
2513-number-of-pairs-satisfying-inequality

Math

0231-power-of-two
0258-add-digits
0264-ugly-number-ii
0380-insert-delete-getrandom-o1
0539-minimum-time-difference
0755-reach-a-number
1146-greatest-common-divisor-of-strings
1951-find-the-winner-of-the-circular-game
2448-count-number-of-bad-pairs
2491-smallest-even-multiple
2628-minimize-the-maximum-of-two-arrays
2645-pass-the-pillow
2715-k-items-with-the-maximum-sum
2716-prime-subtraction-operation
3450-find-the-child-who-has-the-ball-after-k-seconds
3555-final-array-state-after-k-multiplication-operations-i

Number Theory

0258-add-digits
2491-smallest-even-multiple
2628-minimize-the-maximum-of-two-arrays
2716-prime-subtraction-operation

Linked List

0142-linked-list-cycle-ii
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list
0432-all-oone-data-structure
0859-design-circular-deque
0860-design-circular-queue
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros

Simulation

0258-add-digits
0682-baseball-game
0735-asteroid-collision
0874-backspace-string-compare
1310-watering-plants
1667-find-kth-bit-in-nth-binary-string
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
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
2232-adding-spaces-to-a-string
2299-merge-nodes-in-between-zeros
2343-count-unguarded-cells-in-the-grid
2470-removing-stars-from-a-string
2645-pass-the-pillow
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
3434-find-the-number-of-distinct-colors-among-the-balls
3447-clear-digits
3450-find-the-child-who-has-the-ball-after-k-seconds
3555-final-array-state-after-k-multiplication-operations-i

Recursion

0143-reorder-list
0206-reverse-linked-list
0231-power-of-two
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game

Queue

0649-dota2-senate
0859-design-circular-deque
0860-design-circular-queue
1951-find-the-winner-of-the-circular-game

Stack

0042-trapping-rain-water
0143-reorder-list
0155-min-stack
0316-remove-duplicate-letters
0682-baseball-game
0735-asteroid-collision
0776-n-ary-tree-postorder-traversal
0874-backspace-string-compare
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1320-remove-all-adjacent-duplicates-in-string-ii
1497-design-a-stack-with-increment-operation
1570-final-prices-with-a-special-discount-in-a-shop
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
2021-remove-all-occurrences-of-a-substring
2095-minimum-number-of-swaps-to-make-the-string-balanced
2221-check-if-a-parentheses-string-can-be-valid
2470-removing-stars-from-a-string
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Tree

0129-sum-root-to-leaf-numbers
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0662-maximum-width-of-binary-tree
0776-n-ary-tree-postorder-traversal
2493-reverse-odd-levels-of-binary-tree
2646-kth-largest-sum-in-a-binary-tree

Binary Tree

0129-sum-root-to-leaf-numbers
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0662-maximum-width-of-binary-tree
2493-reverse-odd-levels-of-binary-tree
2646-kth-largest-sum-in-a-binary-tree

Design

0146-lru-cache
0155-min-stack
0380-insert-delete-getrandom-o1
0432-all-oone-data-structure
0729-my-calendar-i
0859-design-circular-deque
0860-design-circular-queue
1497-design-a-stack-with-increment-operation
1512-design-underground-system
1775-design-an-ordered-stream
2413-smallest-number-in-infinite-set

Hash Table

0003-longest-substring-without-repeating-characters
0073-set-matrix-zeroes
0076-minimum-window-substring
0142-linked-list-cycle-ii
0146-lru-cache
0187-repeated-dna-sequences
0264-ugly-number-ii
0347-top-k-frequent-elements
0380-insert-delete-getrandom-o1
0432-all-oone-data-structure
0491-non-decreasing-subsequences
0648-replace-words
0920-uncommon-words-from-two-sentences
0940-fruit-into-baskets
1256-rank-transform-of-an-array
1308-smallest-string-with-swaps
1364-tuple-with-same-product
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1502-construct-k-palindrome-strings
1512-design-underground-system
1556-make-two-arrays-equal-by-reversing-subarrays
1752-arithmetic-subarrays
1775-design-an-ordered-stream
1786-count-the-number-of-consistent-strings
1866-restore-the-array-from-adjacent-pairs
1915-check-if-one-string-swap-can-make-strings-equal
2059-unique-length-3-palindromic-subsequences
2163-kth-distinct-string-in-an-array
2220-find-all-possible-recipes-from-given-supplies
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2413-smallest-number-in-infinite-set
2448-count-number-of-bad-pairs
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2599-take-k-of-each-character-from-left-and-right
2695-find-score-of-an-array-after-marking-all-elements
2766-find-the-prefix-common-array-of-two-arrays
3267-find-longest-special-substring-that-occurs-thrice-i
3412-permutation-difference-between-two-strings
3434-find-the-number-of-distinct-colors-among-the-balls
3455-minimum-length-of-string-after-operations

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0187-repeated-dna-sequences
0940-fruit-into-baskets
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1755-defuse-the-bomb
1966-frequency-of-the-most-frequent-element
2134-maximize-the-confusion-of-an-exam
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
3267-find-longest-special-substring-that-occurs-thrice-i
3380-shortest-subarray-with-or-at-least-k-ii
3522-find-the-power-of-k-size-subarrays-i

Data Stream

1775-design-an-ordered-stream

Dynamic Programming

0042-trapping-rain-water
0055-jump-game
0264-ugly-number-ii
0329-longest-increasing-path-in-a-matrix
0392-is-subsequence
0803-cheapest-flights-within-k-stops
1063-best-sightseeing-pair
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1756-minimum-deletions-to-make-string-balanced
2176-parallel-courses-iii

Topological Sort

0329-longest-increasing-path-in-a-matrix
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2176-parallel-courses-iii
2220-find-all-possible-recipes-from-given-supplies
2439-longest-cycle-in-a-graph

Bit Manipulation

0187-repeated-dna-sequences
0191-number-of-1-bits
0231-power-of-two
0318-maximum-product-of-word-lengths
0476-number-complement
0491-non-decreasing-subsequences
0693-binary-number-with-alternating-bits
1435-xor-queries-of-a-subarray
1786-count-the-number-of-consistent-strings
2059-unique-length-3-palindromic-subsequences
2170-count-number-of-maximum-bitwise-or-subsets
2356-largest-combination-with-bitwise-and-greater-than-zero
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
3291-find-if-array-can-be-sorted
3380-shortest-subarray-with-or-at-least-k-ii

Bucket Sort

0347-top-k-frequent-elements
0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0347-top-k-frequent-elements
0920-uncommon-words-from-two-sentences
0948-sort-an-array
1341-split-a-string-in-balanced-strings
1364-tuple-with-same-product
1482-how-many-numbers-are-smaller-than-the-current-number
1502-construct-k-palindrome-strings
1786-count-the-number-of-consistent-strings
1915-check-if-one-string-swap-can-make-strings-equal
2163-kth-distinct-string-in-an-array
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2448-count-number-of-bad-pairs
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations

Rolling Hash

0187-repeated-dna-sequences
3309-count-prefix-and-suffix-pairs-i

Hash Function

0187-repeated-dna-sequences
3309-count-prefix-and-suffix-pairs-i

Monotonic Stack

0042-trapping-rain-water
0316-remove-duplicate-letters
1002-maximum-width-ramp
1570-final-prices-with-a-special-discount-in-a-shop

Binary Search Tree

0230-kth-smallest-element-in-a-bst

Backtracking

0491-non-decreasing-subsequences
0813-all-paths-from-source-to-target
2170-count-number-of-maximum-bitwise-or-subsets

Prefix Sum

1435-xor-queries-of-a-subarray
1537-maximum-score-after-splitting-a-string
1966-frequency-of-the-most-frequent-element
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2134-maximize-the-confusion-of-an-exam
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges

Trie

0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
0648-replace-words
3309-count-prefix-and-suffix-pairs-i

Doubly-Linked List

0146-lru-cache
0432-all-oone-data-structure

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops
1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid

Enumeration

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

Brainteaser

2533-bitwise-xor-of-all-pairings

Randomized

0380-insert-delete-getrandom-o1

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

Quickselect

0347-top-k-frequent-elements

Memoization

0329-longest-increasing-path-in-a-matrix

About

A2SV competitive programming

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published