Skip to content

Collection of LeetCode questions to ace the coding interview! In Python with type defns , now cpp

Notifications You must be signed in to change notification settings

senorbeast/leetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,143 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetCode

Collection of LeetCode questions to ace the coding interview! - Created using LeetHub

Good Examples with Explanations:

Recursion:

LeetCode Topics

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0049-group-anagrams
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0128-longest-consecutive-sequence
0133-clone-graph
0139-word-break
0141-linked-list-cycle
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0621-task-scheduler
1023-time-based-key-value-store

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0049-group-anagrams
0072-edit-distance
0079-word-search
0091-decode-ways
0115-distinct-subsequences
0125-valid-palindrome
0131-palindrome-partitioning
0139-word-break
0242-valid-anagram
0297-serialize-and-deserialize-binary-tree
1023-time-based-key-value-store
1250-longest-common-subsequence

Sorting

0015-3sum
0049-group-anagrams
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0621-task-scheduler
0883-car-fleet
1014-k-closest-points-to-origin

Array

0001-two-sum
0011-container-with-most-water
0015-3sum
0033-search-in-rotated-sorted-array
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0046-permutations
0049-group-anagrams
0051-n-queens
0074-search-a-2d-matrix
0078-subsets
0079-word-search
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
0139-word-break
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0200-number-of-islands
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
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
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
0883-car-fleet
0907-koko-eating-bananas
1014-k-closest-points-to-origin
1036-rotting-oranges
1127-last-stone-weight
1426-find-n-unique-integers-sum-up-to-zero

Divide and Conquer

0023-merge-k-sorted-lists
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

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0621-task-scheduler
0789-kth-largest-element-in-a-stream
1014-k-closest-points-to-origin
1127-last-stone-weight

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

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0125-valid-palindrome
0141-linked-list-cycle
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number

Greedy

0011-container-with-most-water
0621-task-scheduler

Binary Search

0033-search-in-rotated-sorted-array
0074-search-a-2d-matrix
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0792-binary-search
0907-koko-eating-bananas
1023-time-based-key-value-store

Matrix

0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0695-max-area-of-island
1036-rotting-oranges

Design

0297-serialize-and-deserialize-binary-tree
0789-kth-largest-element-in-a-stream
1023-time-based-key-value-store

Linked List

0019-remove-nth-node-from-end-of-list
0023-merge-k-sorted-lists
0141-linked-list-cycle

Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0105-construct-binary-tree-from-preorder-and-inorder-traversal
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
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
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
0417-pacific-atlantic-water-flow
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0684-redundant-connection
0695-max-area-of-island
1544-count-good-nodes-in-binary-tree

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
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
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
0105-construct-binary-tree-from-preorder-and-inorder-traversal
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

Stack

0020-valid-parentheses
0042-trapping-rain-water
0150-evaluate-reverse-polish-notation
0739-daily-temperatures
0883-car-fleet

Math

0062-unique-paths
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
1014-k-closest-points-to-origin
1426-find-n-unique-integers-sum-up-to-zero

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

Sliding Window

0003-longest-substring-without-repeating-characters

Data Stream

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

Geometry

1014-k-closest-points-to-origin

Backtracking

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

Bit Manipulation

0078-subsets
0090-subsets-ii
0287-find-the-duplicate-number

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0684-redundant-connection
0695-max-area-of-island

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0329-longest-increasing-path-in-a-matrix
0684-redundant-connection

Topological Sort

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

Dynamic Programming

0005-longest-palindromic-substring
0042-trapping-rain-water
0062-unique-paths
0070-climbing-stairs
0072-edit-distance
0091-decode-ways
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
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0416-partition-equal-subset-sum
0494-target-sum
0518-coin-change-ii
0747-min-cost-climbing-stairs
1250-longest-common-subsequence

Memoization

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

Trie

0139-word-break

Combinatorics

0062-unique-paths

Prefix Sum

0238-product-of-array-except-self

Monotonic Stack

0042-trapping-rain-water
0739-daily-temperatures
0883-car-fleet

Merge Sort

0023-merge-k-sorted-lists

Union-Find

0200-number-of-islands

About

Collection of LeetCode questions to ace the coding interview! In Python with type defns , now cpp

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published