Skip to content

erdenebayrd/leetcode

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

Array

0015-3sum
0042-trapping-rain-water
0049-group-anagrams
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0073-set-matrix-zeroes
0075-sort-colors
0162-find-peak-element
0200-number-of-islands
0215-kth-largest-element-in-an-array
0253-meeting-rooms-ii
0302-smallest-rectangle-enclosing-black-pixels
0311-sparse-matrix-multiplication
0317-shortest-distance-from-all-buildings
0325-maximum-size-subarray-sum-equals-k
0346-moving-average-from-data-stream
0353-design-snake-game
0361-bomb-enemy
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0621-task-scheduler
0713-subarray-product-less-than-k
0797-rabbits-in-forest
1107-minimum-swaps-to-group-all-1s-together
1227-number-of-equivalent-domino-pairs
1293-three-consecutive-odds
1366-first-unique-number
1421-find-numbers-with-even-number-of-digits
1483-rank-teams-by-votes
1656-count-good-triplets
1713-dot-product-of-two-sparse-vectors
1993-sum-of-all-subset-xor-totals
2048-build-array-from-permutation
2160-minimum-operations-to-make-a-uni-value-grid
2169-simple-bank-system
2180-maximum-number-of-tasks-you-can-assign
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2237-longest-palindrome-by-concatenating-two-letter-words
2249-count-the-hidden-sequences
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2277-count-equal-and-divisible-pairs-in-an-array
2280-count-good-triplets-in-an-array
2308-divide-array-into-equal-pairs
2394-count-subarrays-with-score-less-than-k
2527-count-subarrays-with-fixed-bounds
2551-apply-operations-to-an-array
2555-design-sql
2588-maximum-number-of-points-from-grid-queries
2614-maximum-count-of-positive-integer-and-negative-integer
2626-count-the-number-of-good-subarrays
2665-minimum-time-to-repair-cars
2681-put-marbles-in-bags
2690-house-robber-iv
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2856-count-complete-subarrays-in-an-array
2880-find-the-closest-marked-node
2888-minimum-index-of-a-valid-split
2915-count-of-interesting-subarrays
3001-apply-operations-to-maximize-score
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
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
3194-find-words-containing-character
3213-count-subarrays-where-max-element-appears-at-least-k-times
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3348-minimum-cost-walk-in-weighted-graph
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3430-count-days-without-meetings
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3483-alternating-groups-ii
3594-identify-the-largest-outlier-in-an-array
3621-minimum-operations-to-make-array-values-equal-to-k
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3639-zero-array-transformation-i
3643-zero-array-transformation-ii
3647-zero-array-transformation-iii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3657-check-if-grid-can-be-cut-into-sections
3685-count-subarrays-of-length-three-with-a-condition

Bit Manipulation

0266-palindrome-permutation
1993-sum-of-all-subset-xor-totals
2059-unique-length-3-palindromic-subsequences
2308-divide-array-into-equal-pairs
3307-find-the-maximum-sum-of-node-values
3348-minimum-cost-walk-in-weighted-graph
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Queue

0346-moving-average-from-data-stream
0353-design-snake-game
1366-first-unique-number
2180-maximum-number-of-tasks-you-can-assign
2527-count-subarrays-with-fixed-bounds
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Sliding Window

0713-subarray-product-less-than-k
1084-find-k-length-substrings-with-no-repeated-characters
1107-minimum-swaps-to-group-all-1s-together
1460-number-of-substrings-containing-all-three-characters
2394-count-subarrays-with-score-less-than-k
2527-count-subarrays-with-fixed-bounds
2626-count-the-number-of-good-subarrays
2856-count-complete-subarrays-in-an-array
3213-count-subarrays-where-max-element-appears-at-least-k-times
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3483-alternating-groups-ii

Prefix Sum

0253-meeting-rooms-ii
0325-maximum-size-subarray-sum-equals-k
0713-subarray-product-less-than-k
2059-unique-length-3-palindromic-subsequences
2249-count-the-hidden-sequences
2394-count-subarrays-with-score-less-than-k
2915-count-of-interesting-subarrays
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3639-zero-array-transformation-i
3643-zero-array-transformation-ii
3647-zero-array-transformation-iii

Hash Table

0049-group-anagrams
0073-set-matrix-zeroes
0146-lru-cache
0266-palindrome-permutation
0311-sparse-matrix-multiplication
0314-binary-tree-vertical-order-traversal
0325-maximum-size-subarray-sum-equals-k
0353-design-snake-game
0359-logger-rate-limiter
0621-task-scheduler
0768-partition-labels
0778-reorganize-string
0797-rabbits-in-forest
1084-find-k-length-substrings-with-no-repeated-characters
1218-lowest-common-ancestor-of-deepest-leaves
1227-number-of-equivalent-domino-pairs
1366-first-unique-number
1460-number-of-substrings-containing-all-three-characters
1483-rank-teams-by-votes
1500-count-largest-group
1713-dot-product-of-two-sparse-vectors
1790-lowest-common-ancestor-of-a-binary-tree-iii
1986-largest-color-value-in-a-directed-graph
2059-unique-length-3-palindromic-subsequences
2161-stock-price-fluctuation
2169-simple-bank-system
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2237-longest-palindrome-by-concatenating-two-letter-words
2308-divide-array-into-equal-pairs
2487-optimal-partition-of-string
2555-design-sql
2626-count-the-number-of-good-subarrays
2707-merge-two-2d-arrays-by-summing-values
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
2915-count-of-interesting-subarrays
3548-find-the-count-of-good-integers
3594-identify-the-largest-outlier-in-an-array
3621-minimum-operations-to-make-array-values-equal-to-k
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct

String

0038-count-and-say
0049-group-anagrams
0266-palindrome-permutation
0408-valid-word-abbreviation
0680-valid-palindrome-ii
0768-partition-labels
0778-reorganize-string
0868-push-dominoes
1051-shortest-way-to-form-string
1058-lexicographically-smallest-equivalent-string
1084-find-k-length-substrings-with-no-repeated-characters
1371-minimum-remove-to-make-valid-parentheses
1460-number-of-substrings-containing-all-three-characters
1483-rank-teams-by-votes
1894-merge-strings-alternately
2059-unique-length-3-palindromic-subsequences
2220-find-all-possible-recipes-from-given-supplies
2237-longest-palindrome-by-concatenating-two-letter-words
2414-move-pieces-to-obtain-a-string
2487-optimal-partition-of-string
2555-design-sql
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3194-find-words-containing-character
3243-count-the-number-of-powerful-integers
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations
3683-find-the-lexicographically-largest-string-from-the-box-i

Counting

0621-task-scheduler
0778-reorganize-string
1227-number-of-equivalent-domino-pairs
1483-rank-teams-by-votes
1986-largest-color-value-in-a-directed-graph
2237-longest-palindrome-by-concatenating-two-letter-words
2308-divide-array-into-equal-pairs
2614-maximum-count-of-positive-integer-and-negative-integer
3594-identify-the-largest-outlier-in-an-array
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii

Binary Search

0162-find-peak-element
0302-smallest-rectangle-enclosing-black-pixels
0713-subarray-product-less-than-k
1051-shortest-way-to-form-string
2180-maximum-number-of-tasks-you-can-assign
2280-count-good-triplets-in-an-array
2394-count-subarrays-with-score-less-than-k
2614-maximum-count-of-positive-integer-and-negative-integer
2665-minimum-time-to-repair-cars
2690-house-robber-iv
2699-count-the-number-of-fair-pairs
3643-zero-array-transformation-ii

Math

0368-largest-divisible-subset
0797-rabbits-in-forest
1421-find-numbers-with-even-number-of-digits
1500-count-largest-group
1889-check-if-number-is-a-sum-of-powers-of-three
1993-sum-of-all-subset-xor-totals
2050-count-good-numbers
2160-minimum-operations-to-make-a-uni-value-grid
2383-add-two-integers
2415-count-the-number-of-ideal-arrays
2610-closest-prime-numbers-in-range
2649-count-total-number-of-colored-cells
2998-count-symmetric-integers
3001-apply-operations-to-maximize-score
3172-divisible-and-non-divisible-sums-difference
3201-distribute-candies-among-children-ii
3216-distribute-candies-among-children-iii
3243-count-the-number-of-powerful-integers
3321-type-of-triangle
3548-find-the-count-of-good-integers
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations

Two Pointers

0015-3sum
0042-trapping-rain-water
0075-sort-colors
0253-meeting-rooms-ii
0408-valid-word-abbreviation
0680-valid-palindrome-ii
0768-partition-labels
0868-push-dominoes
1051-shortest-way-to-form-string
1713-dot-product-of-two-sparse-vectors
1790-lowest-common-ancestor-of-a-binary-tree-iii
1894-merge-strings-alternately
2265-partition-array-according-to-given-pivot
2414-move-pieces-to-obtain-a-string
2551-apply-operations-to-an-array
2588-maximum-number-of-points-from-grid-queries
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
3683-find-the-lexicographically-largest-string-from-the-box-i

Simulation

0054-spiral-matrix
0353-design-snake-game
2048-build-array-from-permutation
2169-simple-bank-system
2265-partition-array-according-to-given-pivot
2551-apply-operations-to-an-array

Number Theory

2415-count-the-number-of-ideal-arrays
2610-closest-prime-numbers-in-range
3001-apply-operations-to-maximize-score

Union Find

0200-number-of-islands
0323-number-of-connected-components-in-an-undirected-graph
1058-lexicographically-smallest-equivalent-string
2588-maximum-number-of-points-from-grid-queries
2793-count-the-number-of-complete-components
3348-minimum-cost-walk-in-weighted-graph

Graph

0323-number-of-connected-components-in-an-undirected-graph
1986-largest-color-value-in-a-directed-graph
2090-number-of-ways-to-arrive-at-destination
2220-find-all-possible-recipes-from-given-supplies
2793-count-the-number-of-complete-components
2880-find-the-closest-marked-node
3348-minimum-cost-walk-in-weighted-graph
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Topological Sort

1986-largest-color-value-in-a-directed-graph
2090-number-of-ways-to-arrive-at-destination
2220-find-all-possible-recipes-from-given-supplies

Depth-First Search

0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0200-number-of-islands
0302-smallest-rectangle-enclosing-black-pixels
0314-binary-tree-vertical-order-traversal
0323-number-of-connected-components-in-an-undirected-graph
0543-diameter-of-binary-tree
0975-range-sum-of-bst
1218-lowest-common-ancestor-of-deepest-leaves
2793-count-the-number-of-complete-components

Breadth-First Search

0199-binary-tree-right-side-view
0200-number-of-islands
0302-smallest-rectangle-enclosing-black-pixels
0314-binary-tree-vertical-order-traversal
0317-shortest-distance-from-all-buildings
0323-number-of-connected-components-in-an-undirected-graph
1218-lowest-common-ancestor-of-deepest-leaves
2588-maximum-number-of-points-from-grid-queries
2793-count-the-number-of-complete-components

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0253-meeting-rooms-ii
0621-task-scheduler
0778-reorganize-string
2161-stock-price-fluctuation
2588-maximum-number-of-points-from-grid-queries
2681-put-marbles-in-bags
2880-find-the-closest-marked-node
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3647-zero-array-transformation-iii

Shortest Path

2090-number-of-ways-to-arrive-at-destination
2880-find-the-closest-marked-node
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Dynamic Programming

0042-trapping-rain-water
0055-jump-game
0124-binary-tree-maximum-path-sum
0361-bomb-enemy
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0806-domino-and-tromino-tiling
0868-push-dominoes
1986-largest-color-value-in-a-directed-graph
2061-painting-a-grid-with-three-different-colors
2090-number-of-ways-to-arrive-at-destination
2262-solving-questions-with-brainpower
2415-count-the-number-of-ideal-arrays
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3243-count-the-number-of-powerful-integers
3307-find-the-maximum-sum-of-node-values
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3637-count-number-of-balanced-permutations

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0075-sort-colors
0215-kth-largest-element-in-an-array
0253-meeting-rooms-ii
0314-binary-tree-vertical-order-traversal
0368-largest-divisible-subset
0621-task-scheduler
0778-reorganize-string
1483-rank-teams-by-votes
2160-minimum-operations-to-make-a-uni-value-grid
2180-maximum-number-of-tasks-you-can-assign
2215-finding-3-digit-even-numbers
2588-maximum-number-of-points-from-grid-queries
2681-put-marbles-in-bags
2699-count-the-number-of-fair-pairs
2888-minimum-index-of-a-valid-split
3001-apply-operations-to-maximize-score
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3430-count-days-without-meetings
3647-zero-array-transformation-iii
3657-check-if-grid-can-be-cut-into-sections

Tree

0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0314-binary-tree-vertical-order-traversal
0543-diameter-of-binary-tree
0975-range-sum-of-bst
1218-lowest-common-ancestor-of-deepest-leaves
1790-lowest-common-ancestor-of-a-binary-tree-iii
3307-find-the-maximum-sum-of-node-values

Binary Tree

0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0314-binary-tree-vertical-order-traversal
0543-diameter-of-binary-tree
0975-range-sum-of-bst
1218-lowest-common-ancestor-of-deepest-leaves
1790-lowest-common-ancestor-of-a-binary-tree-iii

Matrix

0054-spiral-matrix
0073-set-matrix-zeroes
0200-number-of-islands
0302-smallest-rectangle-enclosing-black-pixels
0311-sparse-matrix-multiplication
0317-shortest-distance-from-all-buildings
0361-bomb-enemy
2160-minimum-operations-to-make-a-uni-value-grid
2588-maximum-number-of-points-from-grid-queries
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Greedy

0055-jump-game
0253-meeting-rooms-ii
0621-task-scheduler
0680-valid-palindrome-ii
0768-partition-labels
0778-reorganize-string
0797-rabbits-in-forest
1051-shortest-way-to-form-string
2180-maximum-number-of-tasks-you-can-assign
2237-longest-palindrome-by-concatenating-two-letter-words
2487-optimal-partition-of-string
2681-put-marbles-in-bags
3001-apply-operations-to-maximize-score
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3307-find-the-maximum-sum-of-node-values
3647-zero-array-transformation-iii

Design

0146-lru-cache
0346-moving-average-from-data-stream
0353-design-snake-game
0359-logger-rate-limiter
1366-first-unique-number
1713-dot-product-of-two-sparse-vectors
2161-stock-price-fluctuation
2169-simple-bank-system
2555-design-sql

Data Stream

0346-moving-average-from-data-stream
0359-logger-rate-limiter
1366-first-unique-number
2161-stock-price-fluctuation

Stack

0042-trapping-rain-water
1371-minimum-remove-to-make-valid-parentheses
3001-apply-operations-to-maximize-score

Enumeration

1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2215-finding-3-digit-even-numbers
2998-count-symmetric-integers
3201-distribute-candies-among-children-ii
3548-find-the-count-of-good-integers
3594-identify-the-largest-outlier-in-an-array
3683-find-the-lexicographically-largest-string-from-the-box-i

Ordered Set

2161-stock-price-fluctuation
2280-count-good-triplets-in-an-array

Linked List

0146-lru-cache
1618-delete-n-nodes-after-m-nodes-of-a-linked-list

Doubly-Linked List

0146-lru-cache

Divide and Conquer

0215-kth-largest-element-in-an-array
2280-count-good-triplets-in-an-array

Quickselect

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

Monotonic Stack

0042-trapping-rain-water
3001-apply-operations-to-maximize-score

Backtracking

1993-sum-of-all-subset-xor-totals

Combinatorics

1993-sum-of-all-subset-xor-totals
2415-count-the-number-of-ideal-arrays
3201-distribute-candies-among-children-ii
3216-distribute-candies-among-children-iii
3548-find-the-count-of-good-integers
3637-count-number-of-balanced-permutations

Recursion

2050-count-good-numbers

Binary Indexed Tree

2280-count-good-triplets-in-an-array

Segment Tree

2280-count-good-triplets-in-an-array

Merge Sort

2280-count-good-triplets-in-an-array

Monotonic Queue

2180-maximum-number-of-tasks-you-can-assign
2527-count-subarrays-with-fixed-bounds

Binary Search Tree

0975-range-sum-of-bst

Memoization

1986-largest-color-value-in-a-directed-graph

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published