Skip to content

KR-bluejay/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

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

LeetCode Topics

Math

0002-add-two-numbers
0009-palindrome-number
0013-roman-to-integer
0062-unique-paths
0066-plus-one
0067-add-binary
0202-happy-number
0797-rabbits-in-forest
1421-find-numbers-with-even-number-of-digits
1500-count-largest-group
1585-the-kth-factor-of-n
1993-sum-of-all-subset-xor-totals
2050-count-good-numbers
2160-minimum-operations-to-make-a-uni-value-grid
2507-number-of-common-factors
2998-count-symmetric-integers
3273-most-expensive-item-that-can-not-be-bought

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0038-count-and-say
0049-group-anagrams
0067-add-binary
0071-simplify-path
0072-edit-distance
0079-word-search
0097-interleaving-string
0125-valid-palindrome
0139-word-break
0151-reverse-words-in-a-string
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0266-palindrome-permutation
0424-longest-repeating-character-replacement
0768-partition-labels
1030-smallest-string-starting-from-leaf
1051-shortest-way-to-form-string
1084-find-k-length-substrings-with-no-repeated-characters
1093-recover-a-tree-from-preorder-traversal
1250-longest-common-subsequence
1302-delete-characters-to-make-fancy-string
1960-check-if-the-sentence-is-pangram
2053-check-if-all-characters-have-equal-number-of-occurrences
2220-find-all-possible-recipes-from-given-supplies
2345-minimum-number-of-operations-to-convert-time
2427-first-letter-to-appear-twice
3543-count-substrings-that-satisfy-k-constraint-i

Stack

0020-valid-parentheses
0071-simplify-path
0114-flatten-binary-tree-to-linked-list

Array

0001-two-sum
0011-container-with-most-water
0015-3sum
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0036-valid-sudoku
0039-combination-sum
0046-permutations
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0057-insert-interval
0063-unique-paths-ii
0064-minimum-path-sum
0066-plus-one
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0119-pascals-triangle-ii
0120-triangle
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0136-single-number
0139-word-break
0153-find-minimum-in-rotated-sorted-array
0169-majority-element
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0219-contains-duplicate-ii
0300-longest-increasing-subsequence
0325-maximum-size-subarray-sum-equals-k
0416-partition-equal-subset-sum
0485-max-consecutive-ones
0487-max-consecutive-ones-ii
0643-maximum-average-subarray-i
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0797-rabbits-in-forest
0945-snakes-and-ladders
0948-sort-an-array
1025-minimum-cost-for-tickets
1046-max-consecutive-ones-iii
1049-minimum-domino-rotations-for-equal-row
1063-best-sightseeing-pair
1227-number-of-equivalent-domino-pairs
1421-find-numbers-with-even-number-of-digits
1656-count-good-triplets
1755-defuse-the-bomb
1993-sum-of-all-subset-xor-totals
2003-distinct-numbers-in-each-subarray
2048-build-array-from-permutation
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2220-find-all-possible-recipes-from-given-supplies
2249-count-the-hidden-sequences
2262-solving-questions-with-brainpower
2277-count-equal-and-divisible-pairs-in-an-array
2280-count-good-triplets-in-an-array
2527-count-subarrays-with-fixed-bounds
2626-count-the-number-of-good-subarrays
2699-count-the-number-of-fair-pairs
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
2915-count-of-interesting-subarrays
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
3213-count-subarrays-where-max-element-appears-at-least-k-times
3430-count-days-without-meetings
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3685-count-subarrays-of-length-three-with-a-condition

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0128-longest-consecutive-sequence
0139-word-break
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0208-implement-trie-prefix-tree
0219-contains-duplicate-ii
0266-palindrome-permutation
0325-maximum-size-subarray-sum-equals-k
0359-logger-rate-limiter
0424-longest-repeating-character-replacement
0768-partition-labels
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
1500-count-largest-group
1960-check-if-the-sentence-is-pangram
2003-distinct-numbers-in-each-subarray
2053-check-if-all-characters-have-equal-number-of-occurrences
2220-find-all-possible-recipes-from-given-supplies
2427-first-letter-to-appear-twice
2626-count-the-number-of-good-subarrays
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
2915-count-of-interesting-subarrays
3656-minimum-number-of-operations-to-make-elements-in-array-distinct

Bit Manipulation

0067-add-binary
0078-subsets
0136-single-number
0190-reverse-bits
0191-number-of-1-bits
0266-palindrome-permutation
0338-counting-bits
1993-sum-of-all-subset-xor-totals
2427-first-letter-to-appear-twice
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Counting

0169-majority-element
1227-number-of-equivalent-domino-pairs
2053-check-if-all-characters-have-equal-number-of-occurrences
2427-first-letter-to-appear-twice

Sliding Window

0003-longest-substring-without-repeating-characters
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0424-longest-repeating-character-replacement
0487-max-consecutive-ones-ii
0643-maximum-average-subarray-i
1046-max-consecutive-ones-iii
1084-find-k-length-substrings-with-no-repeated-characters
1755-defuse-the-bomb
2003-distinct-numbers-in-each-subarray
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
3543-count-substrings-that-satisfy-k-constraint-i

Tree

0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0117-populating-next-right-pointers-in-each-node-ii
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0530-minimum-absolute-difference-in-bst
0637-average-of-levels-in-binary-tree
1030-smallest-string-starting-from-leaf
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves

Depth-First Search

0079-word-search
0101-symmetric-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0117-populating-next-right-pointers-in-each-node-ii
0130-surrounded-regions
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0530-minimum-absolute-difference-in-bst
0637-average-of-levels-in-binary-tree
0744-network-delay-time
0813-all-paths-from-source-to-target
1030-smallest-string-starting-from-leaf
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
2793-count-the-number-of-complete-components

Breadth-First Search

0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0112-path-sum
0117-populating-next-right-pointers-in-each-node-ii
0130-surrounded-regions
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0530-minimum-absolute-difference-in-bst
0637-average-of-levels-in-binary-tree
0744-network-delay-time
0813-all-paths-from-source-to-target
0945-snakes-and-ladders
1218-lowest-common-ancestor-of-deepest-leaves
2793-count-the-number-of-complete-components

Binary Tree

0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0112-path-sum
0114-flatten-binary-tree-to-linked-list
0117-populating-next-right-pointers-in-each-node-ii
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0530-minimum-absolute-difference-in-bst
0637-average-of-levels-in-binary-tree
1030-smallest-string-starting-from-leaf
1093-recover-a-tree-from-preorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves

Binary Search Tree

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0074-search-a-2d-matrix
0108-convert-sorted-array-to-binary-search-tree
0153-find-minimum-in-rotated-sorted-array
0209-minimum-size-subarray-sum
0300-longest-increasing-subsequence
0530-minimum-absolute-difference-in-bst
1046-max-consecutive-ones-iii
1051-shortest-way-to-form-string
2164-two-best-non-overlapping-events
2280-count-good-triplets-in-an-array
2699-count-the-number-of-fair-pairs

Simulation

0067-add-binary
2048-build-array-from-permutation

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0028-find-the-index-of-the-first-occurrence-in-a-string
0125-valid-palindrome
0151-reverse-words-in-a-string
0202-happy-number
0768-partition-labels
0908-middle-of-the-linked-list
1051-shortest-way-to-form-string
2699-count-the-number-of-fair-pairs

Linked List

0002-add-two-numbers
0114-flatten-binary-tree-to-linked-list
0117-populating-next-right-pointers-in-each-node-ii
0908-middle-of-the-linked-list
1618-delete-n-nodes-after-m-nodes-of-a-linked-list

Recursion

0002-add-two-numbers
2050-count-good-numbers

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0053-maximum-subarray
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0072-edit-distance
0097-interleaving-string
0119-pascals-triangle-ii
0120-triangle
0139-word-break
0198-house-robber
0213-house-robber-ii
0300-longest-increasing-subsequence
0338-counting-bits
0416-partition-equal-subset-sum
0487-max-consecutive-ones-ii
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1250-longest-common-subsequence
2164-two-best-non-overlapping-events
2262-solving-questions-with-brainpower
3273-most-expensive-item-that-can-not-be-bought

Prefix Sum

0209-minimum-size-subarray-sum
0325-maximum-size-subarray-sum-equals-k
1046-max-consecutive-ones-iii
2249-count-the-hidden-sequences
2915-count-of-interesting-subarrays
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Sorting

0015-3sum
0049-group-anagrams
0169-majority-element
0215-kth-largest-element-in-an-array
0948-sort-an-array
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2699-count-the-number-of-fair-pairs
2888-minimum-index-of-a-valid-split
3430-count-days-without-meetings

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
2793-count-the-number-of-complete-components

Graph

0207-course-schedule
0210-course-schedule-ii
0744-network-delay-time
0813-all-paths-from-source-to-target
2220-find-all-possible-recipes-from-given-supplies
2793-count-the-number-of-complete-components
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Topological Sort

0207-course-schedule
0210-course-schedule-ii
2220-find-all-possible-recipes-from-given-supplies

Matrix

0036-valid-sudoku
0063-unique-paths-ii
0064-minimum-path-sum
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0945-snakes-and-ladders
2160-minimum-operations-to-make-a-uni-value-grid
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Greedy

0011-container-with-most-water
0134-gas-station
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0768-partition-labels
0797-rabbits-in-forest
1049-minimum-domino-rotations-for-equal-row
1051-shortest-way-to-form-string
2345-minimum-number-of-operations-to-convert-time
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros

Divide and Conquer

0053-maximum-subarray
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0169-majority-element
0190-reverse-bits
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
0948-sort-an-array
2280-count-good-triplets-in-an-array

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0039-combination-sum
0046-permutations
0051-n-queens
0052-n-queens-ii
0077-combinations
0078-subsets
0079-word-search
0813-all-paths-from-source-to-target
1030-smallest-string-starting-from-leaf
1993-sum-of-all-subset-xor-totals

Design

0208-implement-trie-prefix-tree
0359-logger-rate-limiter

Trie

0139-word-break
0208-implement-trie-prefix-tree

Combinatorics

0062-unique-paths
1993-sum-of-all-subset-xor-totals

Enumeration

1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2507-number-of-common-factors
2998-count-symmetric-integers

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0744-network-delay-time
0948-sort-an-array
2164-two-best-non-overlapping-events
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Binary Indexed Tree

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

Segment Tree

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

Merge Sort

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

Ordered Set

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

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array

Shortest Path

0744-network-delay-time
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Quickselect

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

Memoization

0139-word-break

Queue

2527-count-subarrays-with-fixed-bounds
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Monotonic Queue

2527-count-subarrays-with-fixed-bounds

Number Theory

1585-the-kth-factor-of-n
2507-number-of-common-factors
3273-most-expensive-item-that-can-not-be-bought

Data Stream

0359-logger-rate-limiter

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published