Skip to content

Harshitha8117/Consistent_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 v2g

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0048-rotate-image
0053-maximum-subarray
0054-spiral-matrix
0066-plus-one
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0088-merge-sorted-array
0121-best-time-to-buy-and-sell-stock
0135-candy
0136-single-number
0137-single-number-ii
0139-word-break
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0169-majority-element
0179-largest-number
0189-rotate-array
0200-number-of-islands
0209-minimum-size-subarray-sum
0217-contains-duplicate
0229-majority-element-ii
0238-product-of-array-except-self
0268-missing-number
0283-move-zeroes
0287-find-the-duplicate-number
0322-coin-change
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0485-max-consecutive-ones
0496-next-greater-element-i
0560-subarray-sum-equals-k
0682-baseball-game
0739-daily-temperatures
0748-largest-number-at-least-twice-of-others
0792-binary-search
0797-rabbits-in-forest
0934-bitwise-ors-of-subarrays
0945-snakes-and-ladders
1019-squares-of-a-sorted-array
1049-minimum-domino-rotations-for-equal-row
1210-mean-of-array-after-removing-some-elements
1227-number-of-equivalent-domino-pairs
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1421-find-numbers-with-even-number-of-digits
1424-maximum-candies-you-can-get-from-boxes
1510-find-lucky-integer-in-an-array
1528-kids-with-the-greatest-number-of-candies
1560-number-of-students-doing-homework-at-a-given-time
1580-shuffle-the-array
1603-running-sum-of-1d-array
1626-can-make-arithmetic-progression-from-sequence
1635-number-of-good-pairs
1791-richest-customer-wealth
1813-maximum-erasure-value
1878-check-if-array-is-sorted-and-rotated
1950-sign-of-the-product-of-an-array
1975-minimum-distance-to-the-target-element
2048-build-array-from-permutation
2058-concatenation-of-array
2116-count-number-of-pairs-with-absolute-difference-k
2137-final-value-of-variable-after-performing-operations
2163-kth-distinct-string-in-an-array
2180-maximum-number-of-tasks-you-can-assign
2210-find-target-indices-after-sorting-array
2215-finding-3-digit-even-numbers
2237-longest-palindrome-by-concatenating-two-letter-words
2249-count-the-hidden-sequences
2269-count-elements-with-strictly-smaller-and-greater-elements
2271-rearrange-array-elements-by-sign
2280-count-good-triplets-in-an-array
2283-sort-even-and-odd-indices-independently
2308-divide-array-into-equal-pairs
2316-count-hills-and-valleys-in-an-array
2350-find-closest-number-to-zero
2394-count-subarrays-with-score-less-than-k
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2527-count-subarrays-with-fixed-bounds
2542-average-value-of-even-numbers-that-are-divisible-by-three
2551-apply-operations-to-an-array
2626-count-the-number-of-good-subarrays
2699-count-the-number-of-fair-pairs
2836-neither-minimum-nor-maximum
2876-number-of-employees-who-met-the-target
2915-count-of-interesting-subarrays
2917-count-pairs-whose-sum-is-less-than-target
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
3226-minimum-number-game
3251-maximum-area-of-longest-diagonal-rectangle
3307-find-the-maximum-sum-of-node-values
3311-ant-on-the-boundary
3321-type-of-triangle
3331-minimum-operations-to-exceed-threshold-value-i
3398-make-a-square-with-the-same-color
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
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
3647-zero-array-transformation-iii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3685-count-subarrays-of-length-three-with-a-condition
3705-find-the-largest-almost-missing-integer
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3788-maximum-unique-subarray-sum-after-deletion
3790-fruits-into-baskets-ii

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0209-minimum-size-subarray-sum
0268-missing-number
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0792-binary-search
2180-maximum-number-of-tasks-you-can-assign
2210-find-target-indices-after-sorting-array
2280-count-good-triplets-in-an-array
2394-count-subarrays-with-score-less-than-k
2699-count-the-number-of-fair-pairs
2917-count-pairs-whose-sum-is-less-than-target
3790-fruits-into-baskets-ii

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0169-majority-element
0190-reverse-bits
0191-number-of-1-bits
2280-count-good-triplets-in-an-array

Math

0002-add-two-numbers
0007-reverse-integer
0009-palindrome-number
0013-roman-to-integer
0029-divide-two-integers
0048-rotate-image
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0172-factorial-trailing-zeroes
0189-rotate-array
0202-happy-number
0231-power-of-two
0258-add-digits
0263-ugly-number
0268-missing-number
0292-nim-game
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0368-largest-divisible-subset
0371-sum-of-two-integers
0412-fizz-buzz
0507-perfect-number
0797-rabbits-in-forest
1013-fibonacci-number
1406-subtract-the-product-and-sum-of-digits-of-an-integer
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1444-number-of-steps-to-reduce-a-number-to-zero
1448-maximum-69-number
1500-count-largest-group
1610-xor-operation-in-an-array
1630-count-odd-numbers-in-an-interval-range
1635-number-of-good-pairs
1642-water-bottles
1806-count-of-matches-in-tournament
1950-sign-of-the-product-of-an-array
2050-count-good-numbers
2383-add-two-integers
2415-count-the-number-of-ideal-arrays
2491-smallest-even-multiple
2507-number-of-common-factors
2542-average-value-of-even-numbers-that-are-divisible-by-three
2857-total-distance-traveled
2998-count-symmetric-integers
3172-divisible-and-non-divisible-sums-difference
3201-distribute-candies-among-children-ii
3243-count-the-number-of-powerful-integers
3321-type-of-triangle
3371-harshad-number
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
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
3918-check-divisibility-by-digit-sum-and-product

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0075-sort-colors
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0151-reverse-words-in-a-string
0165-compare-version-numbers
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0287-find-the-duplicate-number
0344-reverse-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0868-push-dominoes
1019-squares-of-a-sorted-array
1894-merge-strings-alternately
2216-delete-the-middle-node-of-a-linked-list
2271-rearrange-array-elements-by-sign
2551-apply-operations-to-an-array
2699-count-the-number-of-fair-pairs
2917-count-pairs-whose-sum-is-less-than-target
3683-find-the-lexicographically-largest-string-from-the-box-i

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0013-roman-to-integer
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0038-count-and-say
0058-length-of-last-word
0067-add-binary
0125-valid-palindrome
0139-word-break
0151-reverse-words-in-a-string
0165-compare-version-numbers
0179-largest-number
0344-reverse-string
0394-decode-string
0409-longest-palindrome
0412-fizz-buzz
0868-push-dominoes
1128-remove-all-adjacent-duplicates-in-string
1205-defanging-an-ip-address
1302-delete-characters-to-make-fancy-string
1894-merge-strings-alternately
1960-check-if-the-sentence-is-pangram
2137-final-value-of-variable-after-performing-operations
2163-kth-distinct-string-in-an-array
2237-longest-palindrome-by-concatenating-two-letter-words
2243-check-if-all-as-appears-before-all-bs
2346-largest-3-same-digit-number-in-string
2470-removing-stars-from-a-string
2502-sort-the-people
3143-longest-unequal-adjacent-groups-subsequence-i
3194-find-words-containing-character
3243-count-the-number-of-powerful-integers
3379-score-of-a-string
3396-valid-word
3617-find-the-original-typed-string-i
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
3736-find-valid-pair-of-adjacent-digits-in-string

Dynamic Programming

0005-longest-palindromic-substring
0053-maximum-subarray
0070-climbing-stairs
0121-best-time-to-buy-and-sell-stock
0139-word-break
0152-maximum-product-subarray
0322-coin-change
0338-counting-bits
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0806-domino-and-tromino-tiling
0868-push-dominoes
0934-bitwise-ors-of-subarrays
1013-fibonacci-number
1986-largest-color-value-in-a-directed-graph
2061-painting-a-grid-with-three-different-colors
2415-count-the-number-of-ideal-arrays
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

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0326-power-of-three
0342-power-of-four
0394-decode-string
1013-fibonacci-number
2050-count-good-numbers

Memoization

0070-climbing-stairs
0139-word-break
1013-fibonacci-number
1986-largest-color-value-in-a-directed-graph

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0394-decode-string
0496-next-greater-element-i
0682-baseball-game
0739-daily-temperatures
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
1128-remove-all-adjacent-duplicates-in-string
2470-removing-stars-from-a-string

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0073-set-matrix-zeroes
0139-word-break
0141-linked-list-cycle
0169-majority-element
0202-happy-number
0217-contains-duplicate
0229-majority-element-ii
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0409-longest-palindrome
0448-find-all-numbers-disappeared-in-an-array
0496-next-greater-element-i
0560-subarray-sum-equals-k
0797-rabbits-in-forest
1218-lowest-common-ancestor-of-deepest-leaves
1227-number-of-equivalent-domino-pairs
1256-rank-transform-of-an-array
1500-count-largest-group
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1813-maximum-erasure-value
1960-check-if-the-sentence-is-pangram
1986-largest-color-value-in-a-directed-graph
2116-count-number-of-pairs-with-absolute-difference-k
2163-kth-distinct-string-in-an-array
2215-finding-3-digit-even-numbers
2237-longest-palindrome-by-concatenating-two-letter-words
2308-divide-array-into-equal-pairs
2502-sort-the-people
2626-count-the-number-of-good-subarrays
2915-count-of-interesting-subarrays
3548-find-the-count-of-good-integers
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
3705-find-the-largest-almost-missing-integer
3736-find-valid-pair-of-adjacent-digits-in-string
3788-maximum-unique-subarray-sum-after-deletion

Sorting

0075-sort-colors
0088-merge-sorted-array
0169-majority-element
0179-largest-number
0217-contains-duplicate
0229-majority-element-ii
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0368-largest-divisible-subset
0455-assign-cookies
0748-largest-number-at-least-twice-of-others
1019-squares-of-a-sorted-array
1210-mean-of-array-after-removing-some-elements
1256-rank-transform-of-an-array
1626-can-make-arithmetic-progression-from-sequence
2180-maximum-number-of-tasks-you-can-assign
2210-find-target-indices-after-sorting-array
2215-finding-3-digit-even-numbers
2269-count-elements-with-strictly-smaller-and-greater-elements
2283-sort-even-and-odd-indices-independently
2502-sort-the-people
2699-count-the-number-of-fair-pairs
2836-neither-minimum-nor-maximum
2917-count-pairs-whose-sum-is-less-than-target
3226-minimum-number-game
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3647-zero-array-transformation-iii

Enumeration

2215-finding-3-digit-even-numbers
2507-number-of-common-factors
2998-count-symmetric-integers
3201-distribute-candies-among-children-ii
3398-make-a-square-with-the-same-color
3548-find-the-count-of-good-integers
3683-find-the-lexicographically-largest-string-from-the-box-i

Number Theory

0258-add-digits
2415-count-the-number-of-ideal-arrays
2491-smallest-even-multiple
2507-number-of-common-factors

Counting

0169-majority-element
0229-majority-element-ii
1227-number-of-equivalent-domino-pairs
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1986-largest-color-value-in-a-directed-graph
2116-count-number-of-pairs-with-absolute-difference-k
2163-kth-distinct-string-in-an-array
2237-longest-palindrome-by-concatenating-two-letter-words
2269-count-elements-with-strictly-smaller-and-greater-elements
2308-divide-array-into-equal-pairs
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3736-find-valid-pair-of-adjacent-digits-in-string

Bit Manipulation

0029-divide-two-integers
0067-add-binary
0136-single-number
0137-single-number-ii
0190-reverse-bits
0191-number-of-1-bits
0231-power-of-two
0268-missing-number
0287-find-the-duplicate-number
0338-counting-bits
0342-power-of-four
0371-sum-of-two-integers
0934-bitwise-ors-of-subarrays
1444-number-of-steps-to-reduce-a-number-to-zero
1610-xor-operation-in-an-array
2308-divide-array-into-equal-pairs
2503-longest-subarray-with-maximum-bitwise-and
3307-find-the-maximum-sum-of-node-values

Simulation

0054-spiral-matrix
0067-add-binary
0258-add-digits
0412-fizz-buzz
0682-baseball-game
1642-water-bottles
1806-count-of-matches-in-tournament
2048-build-array-from-permutation
2058-concatenation-of-array
2137-final-value-of-variable-after-performing-operations
2271-rearrange-array-elements-by-sign
2470-removing-stars-from-a-string
2551-apply-operations-to-an-array
2857-total-distance-traveled
3226-minimum-number-game
3311-ant-on-the-boundary
3790-fruits-into-baskets-ii

Heap (Priority Queue)

3226-minimum-number-game
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3647-zero-array-transformation-iii

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0560-subarray-sum-equals-k
1603-running-sum-of-1d-array
2249-count-the-hidden-sequences
2394-count-subarrays-with-score-less-than-k
2915-count-of-interesting-subarrays
3311-ant-on-the-boundary
3639-zero-array-transformation-i
3647-zero-array-transformation-iii

Matrix

0048-rotate-image
0054-spiral-matrix
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0200-number-of-islands
0945-snakes-and-ladders
1791-richest-customer-wealth
3398-make-a-square-with-the-same-color
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

String Matching

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

Tree

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
3307-find-the-maximum-sum-of-node-values
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Depth-First Search

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0200-number-of-islands
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves
2438-find-closest-node-to-given-two-nodes
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Binary Tree

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
1218-lowest-common-ancestor-of-deepest-leaves

Linked List

0002-add-two-numbers
0021-merge-two-sorted-lists
0083-remove-duplicates-from-sorted-list
0141-linked-list-cycle
0206-reverse-linked-list
0234-palindrome-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
2216-delete-the-middle-node-of-a-linked-list

Design

0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
2180-maximum-number-of-tasks-you-can-assign
2527-count-subarrays-with-fixed-bounds

Monotonic Stack

0496-next-greater-element-i
0739-daily-temperatures

Greedy

0011-container-with-most-water
0135-candy
0179-largest-number
0409-longest-palindrome
0455-assign-cookies
0797-rabbits-in-forest
1049-minimum-domino-rotations-for-equal-row
1448-maximum-69-number
2180-maximum-number-of-tasks-you-can-assign
2237-longest-palindrome-by-concatenating-two-letter-words
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
3788-maximum-unique-subarray-sum-after-deletion

Breadth-First Search

0200-number-of-islands
0322-coin-change
0945-snakes-and-ladders
1218-lowest-common-ancestor-of-deepest-leaves
1424-maximum-candies-you-can-get-from-boxes
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Combinatorics

2415-count-the-number-of-ideal-arrays
3201-distribute-candies-among-children-ii
3548-find-the-count-of-good-integers
3637-count-number-of-balanced-permutations

Binary Indexed Tree

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

Segment Tree

2280-count-good-triplets-in-an-array
3790-fruits-into-baskets-ii

Merge Sort

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

Ordered Set

2280-count-good-triplets-in-an-array
3790-fruits-into-baskets-ii

Sliding Window

0003-longest-substring-without-repeating-characters
0209-minimum-size-subarray-sum
1813-maximum-erasure-value
2394-count-subarrays-with-score-less-than-k
2527-count-subarrays-with-fixed-bounds
2626-count-the-number-of-good-subarrays
3213-count-subarrays-where-max-element-appears-at-least-k-times

Monotonic Queue

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

Graph

1424-maximum-candies-you-can-get-from-boxes
1986-largest-color-value-in-a-directed-graph
2438-find-closest-node-to-given-two-nodes
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Shortest Path

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

Trie

0139-word-break

Brainteaser

0292-nim-game
2503-longest-subarray-with-maximum-bitwise-and

Game Theory

0292-nim-game

Union Find

0200-number-of-islands

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published