Skip to content

AmanL02/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Array

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0496-next-greater-element-i
0503-next-greater-element-ii
0735-asteroid-collision
0943-sum-of-subarray-minimums
1037-minimum-number-of-k-consecutive-bit-flips
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1552-build-an-array-with-stack-operations
1570-final-prices-with-a-special-discount-in-a-shop
1605-minimum-number-of-days-to-make-m-bouquets

Hash Table

0003-longest-substring-without-repeating-characters
0496-next-greater-element-i
1370-count-number-of-nice-subarrays

Math

0231-power-of-two
0326-power-of-three
1370-count-number-of-nice-subarrays

Sliding Window

0003-longest-substring-without-repeating-characters
1037-minimum-number-of-k-consecutive-bit-flips
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Linked List

0021-merge-two-sorted-lists

Recursion

0021-merge-two-sorted-lists
0231-power-of-two
0326-power-of-three

Bit Manipulation

0231-power-of-two
1037-minimum-number-of-k-consecutive-bit-flips

String

0003-longest-substring-without-repeating-characters
0020-valid-parentheses

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
1037-minimum-number-of-k-consecutive-bit-flips
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Heap (Priority Queue)

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
2379-maximum-total-importance-of-roads

Ordered Set

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Binary Search

1605-minimum-number-of-days-to-make-m-bouquets

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0496-next-greater-element-i
0503-next-greater-element-ii
0735-asteroid-collision
0943-sum-of-subarray-minimums
1552-build-an-array-with-stack-operations
1570-final-prices-with-a-special-discount-in-a-shop

Simulation

0735-asteroid-collision
1552-build-an-array-with-stack-operations

Prefix Sum

1037-minimum-number-of-k-consecutive-bit-flips

Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph

Binary Search Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0496-next-greater-element-i
0503-next-greater-element-ii
0943-sum-of-subarray-minimums
1570-final-prices-with-a-special-discount-in-a-shop

Divide and Conquer

1285-balance-a-binary-search-tree

Greedy

1285-balance-a-binary-search-tree
2379-maximum-total-importance-of-roads

Dynamic Programming

0042-trapping-rain-water
0085-maximal-rectangle
0943-sum-of-subarray-minimums

Matrix

0085-maximal-rectangle

Two Pointers

0042-trapping-rain-water

Graph

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1916-find-center-of-star-graph
2379-maximum-total-importance-of-roads

Design

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

Sorting

2379-maximum-total-importance-of-roads

Breadth-First Search

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph

Topological Sort

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph

LeetCode Topics

Array

0040-combination-sum-ii
0130-surrounded-regions
0135-candy
0179-largest-number
0215-kth-largest-element-in-an-array
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0539-minimum-time-difference
0542-01-matrix
0621-task-scheduler
0624-maximum-distance-in-arrays
0719-find-k-th-smallest-pair-distance
0870-magic-squares-in-grid
0890-lemonade-change
0906-walking-robot-simulation
0921-spiral-matrix-iii
0940-fruit-into-baskets
0948-sort-an-array
0999-regions-cut-by-slashes
1036-rotting-oranges
1050-construct-binary-search-tree-from-preorder-traversal
1073-number-of-enclaves
1196-filling-bookcase-shelves
1207-delete-nodes-and-return-forest
1240-stone-game-ii
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
1435-xor-queries-of-a-subarray
1496-lucky-numbers-in-a-matrix
1511-count-number-of-teams
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
1620-check-if-array-pairs-are-divisible-by-k
1691-minimum-number-of-days-to-disconnect-island
1694-make-sum-divisible-by-p
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1923-sentence-similarity-iii
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2067-maximum-number-of-points-with-cost
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2227-sum-of-subarray-ranges
2255-minimum-swaps-to-group-all-1s-together-ii
2306-create-binary-tree-from-descriptions
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2581-divide-players-into-teams-of-equal-skill
2727-number-of-senior-citizens
2846-robot-collisions
3235-minimum-cost-to-convert-string-i
3501-delete-nodes-from-linked-list-present-in-array

Stack

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0402-remove-k-digits
0726-number-of-atoms
0776-n-ary-tree-postorder-traversal
1050-construct-binary-search-tree-from-preorder-traversal
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
2227-sum-of-subarray-ranges
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions

Monotonic Stack

0402-remove-k-digits
1050-construct-binary-search-tree-from-preorder-traversal
2227-sum-of-subarray-ranges

Union Find

0130-surrounded-regions
0547-number-of-provinces
0801-is-graph-bipartite
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1073-number-of-enclaves
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2035-count-sub-islands

Graph

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0801-is-graph-bipartite
0820-find-eventual-safe-states
0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
2171-second-minimum-time-to-reach-destination
2472-build-a-matrix-with-conditions
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

String

0127-word-ladder
0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0402-remove-k-digits
0424-longest-repeating-character-replacement
0539-minimum-time-difference
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0664-strange-printer
0726-number-of-atoms
0920-uncommon-words-from-two-sentences
1298-reverse-substrings-between-each-pair-of-parentheses
1460-number-of-substrings-containing-all-three-characters
1473-find-the-longest-substring-containing-vowels-in-even-counts
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
1923-sentence-similarity-iii
2076-sum-of-digits-of-string-after-convert
2163-kth-distinct-string-in-an-array
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2502-sort-the-people
2727-number-of-senior-citizens
2800-minimum-string-length-after-removing-substrings
3235-minimum-cost-to-convert-string-i
3276-minimum-number-of-pushes-to-type-word-ii

Greedy

0135-candy
0179-largest-number
0402-remove-k-digits
0455-assign-cookies
0621-task-scheduler
0624-maximum-distance-in-arrays
0890-lemonade-change
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1818-maximum-score-from-removing-substrings
3276-minimum-number-of-pushes-to-type-word-ii

Hash Table

0127-word-ladder
0264-ugly-number-ii
0350-intersection-of-two-arrays-ii
0424-longest-repeating-character-replacement
0567-permutation-in-string
0621-task-scheduler
0653-two-sum-iv-input-is-a-bst
0726-number-of-atoms
0870-magic-squares-in-grid
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0940-fruit-into-baskets
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1029-vertical-order-traversal-of-a-binary-tree
1207-delete-nodes-and-return-forest
1256-rank-transform-of-an-array
1460-number-of-substrings-containing-all-three-characters
1473-find-the-longest-substring-containing-vowels-in-even-counts
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2306-create-binary-tree-from-descriptions
2502-sort-the-people
2581-divide-players-into-teams-of-equal-skill
3276-minimum-number-of-pushes-to-type-word-ii
3501-delete-nodes-from-linked-list-present-in-array

Two Pointers

0350-intersection-of-two-arrays-ii
0455-assign-cookies
0567-permutation-in-string
0653-two-sum-iv-input-is-a-bst
0719-find-k-th-smallest-pair-distance
1615-range-sum-of-sorted-subarray-sums
1923-sentence-similarity-iii
2581-divide-players-into-teams-of-equal-skill

Binary Search

0350-intersection-of-two-arrays-ii
0719-find-k-th-smallest-pair-distance
1615-range-sum-of-sorted-subarray-sums
2006-find-the-student-that-will-replace-the-chalk

Sorting

0179-largest-number
0215-kth-largest-element-in-an-array
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0539-minimum-time-difference
0621-task-scheduler
0719-find-k-th-smallest-pair-distance
0726-number-of-atoms
0948-sort-an-array
1029-vertical-order-traversal-of-a-binary-tree
1256-rank-transform-of-an-array
1333-sort-the-jumbled-numbers
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
1741-sort-array-by-increasing-frequency
2502-sort-the-people
2581-divide-players-into-teams-of-equal-skill
2846-robot-collisions
3276-minimum-number-of-pushes-to-type-word-ii

Sliding Window

0424-longest-repeating-character-replacement
0567-permutation-in-string
0940-fruit-into-baskets
1460-number-of-substrings-containing-all-three-characters
2255-minimum-swaps-to-group-all-1s-together-ii

Linked List

0023-merge-k-sorted-lists
0725-split-linked-list-in-parts
1484-linked-list-in-binary-tree
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Simulation

0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
1642-water-bottles
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2645-pass-the-pillow
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions

Math

0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0273-integer-to-english-words
0539-minimum-time-difference
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0870-magic-squares-in-grid
1240-stone-game-ii
1642-water-bottles
1951-find-the-winner-of-the-circular-game
2155-find-missing-observations
2645-pass-the-pillow
2903-insert-greatest-common-divisors-in-linked-list

Recursion

0241-different-ways-to-add-parentheses
0273-integer-to-english-words
1951-find-the-winner-of-the-circular-game

Queue

1951-find-the-winner-of-the-circular-game

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0653-two-sum-iv-input-is-a-bst
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1029-vertical-order-traversal-of-a-binary-tree
1050-construct-binary-search-tree-from-preorder-traversal
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1029-vertical-order-traversal-of-a-binary-tree
1050-construct-binary-search-tree-from-preorder-traversal
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0543-diameter-of-binary-tree
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0776-n-ary-tree-postorder-traversal
0801-is-graph-bipartite
0820-find-eventual-safe-states
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1029-vertical-order-traversal-of-a-binary-tree
1073-number-of-enclaves
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Matrix

0130-surrounded-regions
0542-01-matrix
0870-magic-squares-in-grid
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1036-rotting-oranges
1073-number-of-enclaves
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions

Divide and Conquer

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0948-sort-an-array

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0264-ugly-number-ii
0621-task-scheduler
0789-kth-largest-element-in-a-stream
0948-sort-an-array
1325-path-with-maximum-probability
2803-modify-graph-edge-weights

Quickselect

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

Merge Sort

0023-merge-k-sorted-lists
0948-sort-an-array

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
2472-build-a-matrix-with-conditions

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0621-task-scheduler
0920-uncommon-words-from-two-sentences
0948-sort-an-array
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
3276-minimum-number-of-pushes-to-type-word-ii

Dynamic Programming

0124-binary-tree-maximum-path-sum
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0542-01-matrix
0650-2-keys-keyboard
0664-strange-printer
1196-filling-bookcase-shelves
1240-stone-game-ii
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost

Shortest Path

1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0127-word-ladder
0130-surrounded-regions
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0542-01-matrix
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0801-is-graph-bipartite
0820-find-eventual-safe-states
0999-regions-cut-by-slashes
1029-vertical-order-traversal-of-a-binary-tree
1036-rotting-oranges
1073-number-of-enclaves
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2171-second-minimum-time-to-reach-destination

Binary Indexed Tree

1511-count-number-of-teams

Strongly Connected Component

1691-minimum-number-of-days-to-disconnect-island

Design

0173-binary-search-tree-iterator
0789-kth-largest-element-in-a-stream

Binary Search Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0173-binary-search-tree-iterator
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1050-construct-binary-search-tree-from-preorder-traversal

Data Stream

0789-kth-largest-element-in-a-stream

Backtracking

0040-combination-sum-ii

Iterator

0173-binary-search-tree-iterator

Prefix Sum

1240-stone-game-ii
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1694-make-sum-divisible-by-p
2006-find-the-student-that-will-replace-the-chalk

Game Theory

1240-stone-game-ii

Bit Manipulation

0476-number-complement
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and

Number Theory

2903-insert-greatest-common-divisors-in-linked-list

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and

Memoization

0241-different-ways-to-add-parentheses

Rolling Hash

0214-shortest-palindrome

String Matching

0214-shortest-palindrome

Hash Function

0214-shortest-palindrome

Database

0584-find-customer-referee
0595-big-countries
0620-not-boring-movies
1153-product-sales-analysis-i
1258-article-views-i
1509-replace-employee-id-with-the-unique-identifier
1827-invalid-tweets
1908-recyclable-and-low-fat-products

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published