Skip to content

JukaleManmath/Leetcode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of LeetCode solutions to ace the coding interview!

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0048-rotate-image
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0139-word-break
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0200-number-of-islands
0212-word-search-ii
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0347-top-k-frequent-elements
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0435-non-overlapping-intervals
0494-target-sum
0518-coin-change-ii
0621-task-scheduler
0695-max-area-of-island
0739-daily-temperatures
0747-min-cost-climbing-stairs
0792-binary-search
0794-swim-in-rising-water
0876-hand-of-straights
0883-car-fleet
0907-koko-eating-bananas
0940-fruit-into-baskets
1014-k-closest-points-to-origin
1036-rotting-oranges
1127-last-stone-weight
1706-min-cost-to-connect-all-points
1977-minimum-interval-to-include-each-query
1995-finding-pairs-with-a-certain-sum
2026-merge-triplets-to-form-target-triplet
3790-fruits-into-baskets-ii

Two Pointers

0005-longest-palindromic-substring
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0287-find-the-duplicate-number
0295-find-median-from-data-stream
0567-permutation-in-string
0647-palindromic-substrings
0768-partition-labels

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0792-binary-search
0794-swim-in-rising-water
0907-koko-eating-bananas
1023-time-based-key-value-store
1977-minimum-interval-to-include-each-query
3790-fruits-into-baskets-ii

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0010-regular-expression-matching
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0072-edit-distance
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0097-interleaving-string
0115-distinct-subsequences
0125-valid-palindrome
0127-word-ladder
0131-palindrome-partitioning
0139-word-break
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0297-serialize-and-deserialize-binary-tree
0424-longest-repeating-character-replacement
0567-permutation-in-string
0647-palindromic-substrings
0678-valid-parenthesis-string
0768-partition-labels
1023-time-based-key-value-store
1250-longest-common-subsequence
3617-find-the-original-typed-string-i

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0127-word-ladder
0128-longest-consecutive-sequence
0133-clone-graph
0138-copy-list-with-random-pointer
0139-word-break
0141-linked-list-cycle
0146-lru-cache
0202-happy-number
0208-implement-trie-prefix-tree
0217-contains-duplicate
0347-top-k-frequent-elements
0355-design-twitter
0424-longest-repeating-character-replacement
0567-permutation-in-string
0621-task-scheduler
0768-partition-labels
0876-hand-of-straights
0940-fruit-into-baskets
1023-time-based-key-value-store
1995-finding-pairs-with-a-certain-sum

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0684-redundant-connection
0695-max-area-of-island
0794-swim-in-rising-water
1706-min-cost-to-connect-all-points

Matrix

0036-valid-sudoku
0048-rotate-image
0054-spiral-matrix
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0212-word-search-ii
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0695-max-area-of-island
0794-swim-in-rising-water
1036-rotting-oranges

Prefix Sum

0238-product-of-array-except-self

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Sorting

0049-group-anagrams
0056-merge-intervals
0088-merge-sorted-array
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0435-non-overlapping-intervals
0621-task-scheduler
0876-hand-of-straights
0883-car-fleet
1014-k-closest-points-to-origin
1977-minimum-interval-to-include-each-query

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0355-design-twitter
0621-task-scheduler
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
1014-k-closest-points-to-origin
1127-last-stone-weight
1977-minimum-interval-to-include-each-query

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements
0621-task-scheduler

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Dynamic Programming

0005-longest-palindromic-substring
0010-regular-expression-matching
0022-generate-parentheses
0042-trapping-rain-water
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0072-edit-distance
0091-decode-ways
0097-interleaving-string
0115-distinct-subsequences
0121-best-time-to-buy-and-sell-stock
0124-binary-tree-maximum-path-sum
0131-palindrome-partitioning
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0494-target-sum
0518-coin-change-ii
0647-palindromic-substrings
0678-valid-parenthesis-string
0747-min-cost-climbing-stairs
0803-cheapest-flights-within-k-stops
1250-longest-common-subsequence

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0232-implement-queue-using-stacks
0678-valid-parenthesis-string
0739-daily-temperatures
0883-car-fleet

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0739-daily-temperatures
0883-car-fleet

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0424-longest-repeating-character-replacement
0567-permutation-in-string
0940-fruit-into-baskets

Design

0146-lru-cache
0155-min-stack
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0232-implement-queue-using-stacks
0295-find-median-from-data-stream
0297-serialize-and-deserialize-binary-tree
0355-design-twitter
0789-kth-largest-element-in-a-stream
1023-time-based-key-value-store
1995-finding-pairs-with-a-certain-sum

Math

0002-add-two-numbers
0048-rotate-image
0062-unique-paths
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0202-happy-number
0231-power-of-two
1014-k-closest-points-to-origin

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list
0355-design-twitter

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0143-reorder-list
0206-reverse-linked-list
0231-power-of-two

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0051-n-queens
0078-subsets
0079-word-search
0090-subsets-ii
0131-palindrome-partitioning
0212-word-search-ii
0494-target-sum

Queue

0232-implement-queue-using-stacks

Bit Manipulation

0078-subsets
0090-subsets-ii
0231-power-of-two
0287-find-the-duplicate-number

Merge Sort

0023-merge-k-sorted-lists

Doubly-Linked List

0146-lru-cache

Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1544-count-good-nodes-in-binary-tree

Depth-First Search

0079-word-search
0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0211-design-add-and-search-words-data-structure
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0329-longest-increasing-path-in-a-matrix
0332-reconstruct-itinerary
0417-pacific-atlantic-water-flow
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
1544-count-good-nodes-in-binary-tree

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0127-word-ladder
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0297-serialize-and-deserialize-binary-tree
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
1036-rotting-oranges
1544-count-good-nodes-in-binary-tree

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1544-count-good-nodes-in-binary-tree

String Matching

0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Binary Search Tree

0098-validate-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0789-kth-largest-element-in-a-stream

Data Stream

0295-find-median-from-data-stream
0789-kth-largest-element-in-a-stream

Geometry

1014-k-closest-points-to-origin

Greedy

0045-jump-game-ii
0055-jump-game
0134-gas-station
0435-non-overlapping-intervals
0621-task-scheduler
0678-valid-parenthesis-string
0768-partition-labels
0876-hand-of-straights
2026-merge-triplets-to-form-target-triplet

Trie

0139-word-break
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0329-longest-increasing-path-in-a-matrix
0332-reconstruct-itinerary
0684-redundant-connection
0744-network-delay-time
0803-cheapest-flights-within-k-stops
1706-min-cost-to-connect-all-points

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0329-longest-increasing-path-in-a-matrix

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops

Eulerian Circuit

0332-reconstruct-itinerary

Minimum Spanning Tree

1706-min-cost-to-connect-all-points

Memoization

0070-climbing-stairs
0139-word-break
0329-longest-increasing-path-in-a-matrix

Segment Tree

3790-fruits-into-baskets-ii

Simulation

0054-spiral-matrix
3790-fruits-into-baskets-ii

Ordered Set

3790-fruits-into-baskets-ii

Combinatorics

0062-unique-paths

Line Sweep

1977-minimum-interval-to-include-each-query

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published