Skip to content

paras2003gupta/Leetcode_Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode_Problems

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

LeetCode Topics

Array

0045-jump-game-ii
0049-group-anagrams
0063-unique-paths-ii
0064-minimum-path-sum
0118-pascals-triangle
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0152-maximum-product-subarray
0188-best-time-to-buy-and-sell-stock-iv
0198-house-robber
0239-sliding-window-maximum
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0312-burst-balloons
0368-largest-divisible-subset
0496-next-greater-element-i
0532-k-diff-pairs-in-an-array
0673-number-of-longest-increasing-subsequence
0679-24-game
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
0945-snakes-and-ladders
1049-minimum-domino-rotations-for-equal-row
1121-partition-array-for-maximum-sum
1129-longest-string-chain
1227-number-of-equivalent-domino-pairs
1242-matrix-block-sum
1348-maximum-score-of-spliced-array
1350-remove-sub-folders-from-the-filesystem
1402-count-square-submatrices-with-all-ones
1421-find-numbers-with-even-number-of-digits
1424-maximum-candies-you-can-get-from-boxes
1478-maximum-number-of-events-that-can-be-attended
1510-find-lucky-integer-in-an-array
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1669-minimum-cost-to-cut-a-stick
1813-maximum-erasure-value
1851-maximum-number-of-events-that-can-be-attended-ii
1995-finding-pairs-with-a-certain-sum
2079-delete-duplicate-folders-in-system
2117-find-original-array-from-doubled-array
2150-kth-smallest-product-of-two-sorted-arrays
2170-count-number-of-maximum-bitwise-or-subsets
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2229-maximum-fruits-harvested-after-at-most-k-steps
2249-count-the-hidden-sequences
2267-minimum-difference-in-sums-after-removal-of-elements
2316-count-hills-and-valleys-in-an-array
2320-find-all-k-distant-indices-in-an-array
2375-minimum-obstacle-removal-to-reach-corner
2387-partition-array-such-that-maximum-difference-is-k
2432-number-of-zero-filled-subarrays
2497-maximum-matching-of-players-with-trainers
2498-smallest-subarrays-with-maximum-bitwise-or
2527-count-subarrays-with-fixed-bounds
2529-range-product-queries-of-powers
2618-maximize-the-minimum-powered-city
2673-maximize-win-from-two-segments
2856-count-complete-subarrays-in-an-array
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
3241-divide-array-into-arrays-with-max-difference
3307-find-the-maximum-sum-of-node-values
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3621-minimum-operations-to-make-array-values-equal-to-k
3685-count-subarrays-of-length-three-with-a-condition
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3843-partition-array-into-two-equal-product-subsets
3884-minimum-absolute-difference-in-sliding-submatrix

Hash Table

0003-longest-substring-without-repeating-characters
0049-group-anagrams
0187-repeated-dna-sequences
0208-implement-trie-prefix-tree
0496-next-greater-element-i
0532-k-diff-pairs-in-an-array
0940-fruit-into-baskets
1129-longest-string-chain
1227-number-of-equivalent-domino-pairs
1500-count-largest-group
1510-find-lucky-integer-in-an-array
1813-maximum-erasure-value
1986-largest-color-value-in-a-directed-graph
1995-finding-pairs-with-a-certain-sum
2079-delete-duplicate-folders-in-system
2117-find-original-array-from-doubled-array
2204-find-subsequence-of-length-k-with-the-largest-sum
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2856-count-complete-subarrays-in-an-array
3445-lexicographically-minimum-string-after-removing-stars
3621-minimum-operations-to-make-array-values-equal-to-k
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3788-maximum-unique-subarray-sum-after-deletion

Prefix Sum

1242-matrix-block-sum
2229-maximum-fruits-harvested-after-at-most-k-steps
2249-count-the-hidden-sequences
2529-range-product-queries-of-powers
2618-maximize-the-minimum-powered-city
3761-maximum-difference-between-even-and-odd-frequency-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Math

0062-unique-paths
0070-climbing-stairs
0231-power-of-two
0342-power-of-four
0368-largest-divisible-subset
0679-24-game
0826-soup-servings
0867-new-21-game
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1500-count-largest-group
2202-sum-of-k-mirror-numbers
2432-number-of-zero-filled-subarrays
2704-maximum-difference-by-remapping-a-digit
3201-distribute-candies-among-children-ii
3600-find-the-k-th-character-in-string-game-i
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3754-maximum-manhattan-distance-after-k-changes

Sliding Window

0003-longest-substring-without-repeating-characters
0187-repeated-dna-sequences
0239-sliding-window-maximum
0867-new-21-game
0940-fruit-into-baskets
1813-maximum-erasure-value
2229-maximum-fruits-harvested-after-at-most-k-steps
2498-smallest-subarrays-with-maximum-bitwise-or
2527-count-subarrays-with-fixed-bounds
2618-maximize-the-minimum-powered-city
2673-maximize-win-from-two-segments
2856-count-complete-subarrays-in-an-array
3213-count-subarrays-where-max-element-appears-at-least-k-times
3743-reschedule-meetings-for-maximum-free-time-i
3761-maximum-difference-between-even-and-odd-frequency-ii

Queue

0239-sliding-window-maximum
2180-maximum-number-of-tasks-you-can-assign
2527-count-subarrays-with-fixed-bounds
2618-maximize-the-minimum-powered-city

Monotonic Queue

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

Binary Search

0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0532-k-diff-pairs-in-an-array
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1851-maximum-number-of-events-that-can-be-attended-ii
2150-kth-smallest-product-of-two-sorted-arrays
2180-maximum-number-of-tasks-you-can-assign
2229-maximum-fruits-harvested-after-at-most-k-steps
2498-smallest-subarrays-with-maximum-bitwise-or
2618-maximize-the-minimum-powered-city
2673-maximize-win-from-two-segments
3790-fruits-into-baskets-ii

Greedy

0044-wildcard-matching
0045-jump-game-ii
0122-best-time-to-buy-and-sell-stock-ii
0957-minimum-add-to-make-parentheses-valid
1049-minimum-domino-rotations-for-equal-row
1478-maximum-number-of-events-that-can-be-attended
1818-maximum-score-from-removing-substrings
2117-find-original-array-from-doubled-array
2140-longest-subsequence-repeated-k-times
2180-maximum-number-of-tasks-you-can-assign
2387-partition-array-such-that-maximum-difference-is-k
2497-maximum-matching-of-players-with-trainers
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2618-maximize-the-minimum-powered-city
2704-maximum-difference-by-remapping-a-digit
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3241-divide-array-into-arrays-with-max-difference
3307-find-the-maximum-sum-of-node-values
3445-lexicographically-minimum-string-after-removing-stars
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion

Sorting

0049-group-anagrams
0368-largest-divisible-subset
0532-k-diff-pairs-in-an-array
1129-longest-string-chain
1478-maximum-number-of-events-that-can-be-attended
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1669-minimum-cost-to-cut-a-stick
1851-maximum-number-of-events-that-can-be-attended-ii
2117-find-original-array-from-doubled-array
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2387-partition-array-such-that-maximum-difference-is-k
2497-maximum-matching-of-players-with-trainers
3241-divide-array-into-arrays-with-max-difference
3307-find-the-maximum-sum-of-node-values
3884-minimum-absolute-difference-in-sliding-submatrix

Two Pointers

0028-find-the-index-of-the-first-occurrence-in-a-string
0287-find-the-duplicate-number
0532-k-diff-pairs-in-an-array
0868-push-dominoes
1129-longest-string-chain
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
2320-find-all-k-distant-indices-in-an-array
2497-maximum-matching-of-players-with-trainers
3683-find-the-lexicographically-largest-string-from-the-box-i

String

0003-longest-substring-without-repeating-characters
0028-find-the-index-of-the-first-occurrence-in-a-string
0044-wildcard-matching
0049-group-anagrams
0072-edit-distance
0115-distinct-subsequences
0132-palindrome-partitioning-ii
0187-repeated-dna-sequences
0208-implement-trie-prefix-tree
0516-longest-palindromic-subsequence
0583-delete-operation-for-two-strings
0868-push-dominoes
0957-minimum-add-to-make-parentheses-valid
1058-lexicographically-smallest-equivalent-string
1129-longest-string-chain
1170-shortest-common-supersequence
1250-longest-common-subsequence
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1437-minimum-insertion-steps-to-make-a-string-palindrome
1818-maximum-score-from-removing-substrings
2079-delete-duplicate-folders-in-system
2140-longest-subsequence-repeated-k-times
2346-largest-3-same-digit-number-in-string
2520-using-a-robot-to-print-the-lexicographically-smallest-string
3194-find-words-containing-character
3396-valid-word
3445-lexicographically-minimum-string-after-removing-stars
3617-find-the-original-typed-string-i
3683-find-the-lexicographically-largest-string-from-the-box-i
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3761-maximum-difference-between-even-and-odd-frequency-ii

Dynamic Programming

0044-wildcard-matching
0045-jump-game-ii
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0115-distinct-subsequences
0118-pascals-triangle
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0132-palindrome-partitioning-ii
0152-maximum-product-subarray
0188-best-time-to-buy-and-sell-stock-iv
0198-house-robber
0300-longest-increasing-subsequence
0312-burst-balloons
0368-largest-divisible-subset
0516-longest-palindromic-subsequence
0583-delete-operation-for-two-strings
0673-number-of-longest-increasing-subsequence
0803-cheapest-flights-within-k-stops
0806-domino-and-tromino-tiling
0826-soup-servings
0867-new-21-game
0868-push-dominoes
0934-bitwise-ors-of-subarrays
1121-partition-array-for-maximum-sum
1129-longest-string-chain
1170-shortest-common-supersequence
1250-longest-common-subsequence
1348-maximum-score-of-spliced-array
1402-count-square-submatrices-with-all-ones
1437-minimum-insertion-steps-to-make-a-string-palindrome
1669-minimum-cost-to-cut-a-stick
1851-maximum-number-of-events-that-can-be-attended-ii
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete
2267-minimum-difference-in-sums-after-removal-of-elements
3307-find-the-maximum-sum-of-node-values
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii

Counting

1227-number-of-equivalent-domino-pairs
1510-find-lucky-integer-in-an-array
1986-largest-color-value-in-a-directed-graph
2140-longest-subsequence-repeated-k-times
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes

Bit Manipulation

0187-repeated-dna-sequences
0231-power-of-two
0287-find-the-duplicate-number
0342-power-of-four
0934-bitwise-ors-of-subarrays
2170-count-number-of-maximum-bitwise-or-subsets
2498-smallest-subarrays-with-maximum-bitwise-or
2529-range-product-queries-of-powers
3307-find-the-maximum-sum-of-node-values
3600-find-the-k-th-character-in-string-game-i
3843-partition-array-into-two-equal-product-subsets

Tree

3307-find-the-maximum-sum-of-node-values

Memoization

0070-climbing-stairs
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete

Combinatorics

0062-unique-paths
3201-distribute-candies-among-children-ii
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements

Graph

0210-course-schedule-ii
0547-number-of-provinces
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
1424-maximum-candies-you-can-get-from-boxes
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1986-largest-color-value-in-a-directed-graph
2375-minimum-obstacle-removal-to-reach-corner
2438-find-closest-node-to-given-two-nodes

Topological Sort

0210-course-schedule-ii
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1986-largest-color-value-in-a-directed-graph

Recursion

0044-wildcard-matching
0231-power-of-two
0342-power-of-four
3600-find-the-k-th-character-in-string-game-i
3843-partition-array-into-two-equal-product-subsets

Depth-First Search

0210-course-schedule-ii
0386-lexicographical-numbers
0547-number-of-provinces
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
1350-remove-sub-folders-from-the-filesystem
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2438-find-closest-node-to-given-two-nodes

Breadth-First Search

0210-course-schedule-ii
0547-number-of-provinces
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0945-snakes-and-ladders
1424-maximum-candies-you-can-get-from-boxes
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2375-minimum-obstacle-removal-to-reach-corner

Matrix

0063-unique-paths-ii
0064-minimum-path-sum
0945-snakes-and-ladders
1242-matrix-block-sum
1402-count-square-submatrices-with-all-ones
2375-minimum-obstacle-removal-to-reach-corner
3884-minimum-absolute-difference-in-sliding-submatrix

Enumeration

2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets
2202-sum-of-k-mirror-numbers
3201-distribute-candies-among-children-ii
3683-find-the-lexicographically-largest-string-from-the-box-i
3741-reschedule-meetings-for-maximum-free-time-ii
3761-maximum-difference-between-even-and-odd-frequency-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair
3843-partition-array-into-two-equal-product-subsets

Binary Indexed Tree

0673-number-of-longest-increasing-subsequence

Segment Tree

0673-number-of-longest-increasing-subsequence
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii

Design

0208-implement-trie-prefix-tree
1995-finding-pairs-with-a-certain-sum

Trie

0208-implement-trie-prefix-tree
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
1350-remove-sub-folders-from-the-filesystem
2079-delete-duplicate-folders-in-system

Union Find

0547-number-of-provinces
0801-is-graph-bipartite
1058-lexicographically-smallest-equivalent-string

Stack

0496-next-greater-element-i
0957-minimum-add-to-make-parentheses-valid
1818-maximum-score-from-removing-substrings
2520-using-a-robot-to-print-the-lexicographically-smallest-string
3445-lexicographically-minimum-string-after-removing-stars

Heap (Priority Queue)

0239-sliding-window-maximum
0803-cheapest-flights-within-k-stops
1478-maximum-number-of-events-that-can-be-attended
2204-find-subsequence-of-length-k-with-the-largest-sum
2267-minimum-difference-in-sums-after-removal-of-elements
2375-minimum-obstacle-removal-to-reach-corner
3445-lexicographically-minimum-string-after-removing-stars

Monotonic Stack

0496-next-greater-element-i

Backtracking

0679-24-game
2140-longest-subsequence-repeated-k-times
2170-count-number-of-maximum-bitwise-or-subsets

Simulation

3600-find-the-k-th-character-in-string-game-i
3790-fruits-into-baskets-ii

Rolling Hash

0187-repeated-dna-sequences

Hash Function

0187-repeated-dna-sequences
2079-delete-duplicate-folders-in-system

Linked List

1411-convert-binary-number-in-a-linked-list-to-integer

String Matching

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

Ordered Set

3790-fruits-into-baskets-ii

Probability and Statistics

0826-soup-servings
0867-new-21-game

Database

0584-find-customer-referee
0595-big-countries
1908-recyclable-and-low-fat-products

Shortest Path

0803-cheapest-flights-within-k-stops
2375-minimum-obstacle-removal-to-reach-corner

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