Skip to content

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Notifications You must be signed in to change notification settings

rohit141914/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

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

Array

0503-next-greater-element-ii

Stack

0503-next-greater-element-ii

Monotonic Stack

0503-next-greater-element-ii

LeetCode Topics

Array

0105-construct-binary-tree-from-preorder-and-inorder-traversal
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0217-contains-duplicate
0219-contains-duplicate-ii
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
0524-longest-word-in-dictionary-through-deleting
0682-baseball-game
0720-longest-word-in-dictionary
0745-find-smallest-letter-greater-than-target
0890-lemonade-change
1002-maximum-width-ramp
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1468-check-if-n-and-its-double-exist
1496-lucky-numbers-in-a-matrix
1538-maximum-points-you-can-obtain-from-cards
1556-make-two-arrays-equal-by-reversing-subarrays
1570-final-prices-with-a-special-discount-in-a-shop
1620-check-if-array-pairs-are-divisible-by-k
1755-defuse-the-bomb
1786-count-the-number-of-consistent-strings
1923-sentence-similarity-iii
1988-minimize-maximum-pair-sum-in-array
2132-convert-1d-array-into-2d-array
2232-adding-spaces-to-a-string
2244-number-of-laser-beams-in-a-bank
2331-intersection-of-multiple-arrays
2341-count-prefixes-of-a-given-string
2411-spiral-matrix-iv
2436-make-array-zero-by-subtracting-equal-amounts
2581-divide-players-into-teams-of-equal-skill
2669-find-the-substring-with-maximum-cost
2721-sum-of-distances
2727-number-of-senior-citizens
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3515-find-if-digit-game-can-be-won
3581-the-two-sneaky-numbers-of-digitville

Hash Table

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0142-linked-list-cycle-ii
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
0676-implement-magic-dictionary
0720-longest-word-in-dictionary
0920-uncommon-words-from-two-sentences
1029-vertical-order-traversal-of-a-binary-tree
1256-rank-transform-of-an-array
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1468-check-if-n-and-its-double-exist
1469-minimum-number-of-steps-to-make-two-strings-anagram
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2293-minimum-number-of-steps-to-make-two-strings-anagram-ii
2331-intersection-of-multiple-arrays
2436-make-array-zero-by-subtracting-equal-amounts
2581-divide-players-into-teams-of-equal-skill
2669-find-the-substring-with-maximum-cost
2677-cousins-in-binary-tree-ii
2721-sum-of-distances
3581-the-two-sneaky-numbers-of-digitville

Two Pointers

0028-find-the-index-of-the-first-occurrence-in-a-string
0061-rotate-list
0142-linked-list-cycle-ii
0143-reorder-list
0295-find-median-from-data-stream
0350-intersection-of-two-arrays-ii
0443-string-compression
0524-longest-word-in-dictionary-through-deleting
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1894-merge-strings-alternately
1923-sentence-similarity-iii
1988-minimize-maximum-pair-sum-in-array
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2232-adding-spaces-to-a-string
2581-divide-players-into-teams-of-equal-skill
3018-make-string-a-subsequence-using-cyclic-increments

Binary Search

0350-intersection-of-two-arrays-ii
0745-find-smallest-letter-greater-than-target
1468-check-if-n-and-its-double-exist

Sorting

0217-contains-duplicate
0242-valid-anagram
0295-find-median-from-data-stream
0350-intersection-of-two-arrays-ii
0524-longest-word-in-dictionary-through-deleting
0720-longest-word-in-dictionary
1029-vertical-order-traversal-of-a-binary-tree
1256-rank-transform-of-an-array
1353-find-resultant-array-after-removing-anagrams
1354-find-players-with-zero-or-one-losses
1468-check-if-n-and-its-double-exist
1556-make-two-arrays-equal-by-reversing-subarrays
1970-sorting-the-sentence
1988-minimize-maximum-pair-sum-in-array
2331-intersection-of-multiple-arrays
2436-make-array-zero-by-subtracting-equal-amounts
2581-divide-players-into-teams-of-equal-skill
2646-kth-largest-sum-in-a-binary-tree

Counting

0920-uncommon-words-from-two-sentences
1354-find-players-with-zero-or-one-losses
1469-minimum-number-of-steps-to-make-two-strings-anagram
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2293-minimum-number-of-steps-to-make-two-strings-anagram-ii
2331-intersection-of-multiple-arrays

Matrix

1496-lucky-numbers-in-a-matrix
2132-convert-1d-array-into-2d-array
2244-number-of-laser-beams-in-a-bank
2411-spiral-matrix-iv

String

0003-longest-substring-without-repeating-characters
0006-zigzag-conversion
0008-string-to-integer-atoi
0012-integer-to-roman
0013-roman-to-integer
0028-find-the-index-of-the-first-occurrence-in-a-string
0242-valid-anagram
0443-string-compression
0524-longest-word-in-dictionary-through-deleting
0676-implement-magic-dictionary
0720-longest-word-in-dictionary
0812-rotate-string
0920-uncommon-words-from-two-sentences
0957-minimum-add-to-make-parentheses-valid
1302-delete-characters-to-make-fancy-string
1353-find-resultant-array-after-removing-anagrams
1469-minimum-number-of-steps-to-make-two-strings-anagram
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1786-count-the-number-of-consistent-strings
1894-merge-strings-alternately
1923-sentence-similarity-iii
1970-sorting-the-sentence
2076-sum-of-digits-of-string-after-convert
2088-minimum-time-to-type-word-using-special-typewriter
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2168-check-if-numbers-are-ascending-in-a-sentence
2232-adding-spaces-to-a-string
2243-check-if-all-as-appears-before-all-bs
2244-number-of-laser-beams-in-a-bank
2293-minimum-number-of-steps-to-make-two-strings-anagram-ii
2304-cells-in-a-range-on-an-excel-sheet
2341-count-prefixes-of-a-given-string
2580-circular-sentence
2669-find-the-substring-with-maximum-cost
2727-number-of-senior-citizens
2800-minimum-string-length-after-removing-substrings
3018-make-string-a-subsequence-using-cyclic-increments
3447-clear-digits
3451-string-compression-iii
3636-check-balanced-string

Math

0012-integer-to-roman
0013-roman-to-integer
2244-number-of-laser-beams-in-a-bank
2903-insert-greatest-common-divisors-in-linked-list
3371-harshad-number
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3515-find-if-digit-game-can-be-won
3581-the-two-sneaky-numbers-of-digitville
3600-find-the-k-th-character-in-string-game-i

Greedy

0890-lemonade-change
0957-minimum-add-to-make-parentheses-valid
1988-minimize-maximum-pair-sum-in-array
2088-minimum-time-to-type-word-using-special-typewriter
2095-minimum-number-of-swaps-to-make-the-string-balanced
2436-make-array-zero-by-subtracting-equal-amounts

Bit Manipulation

0476-number-complement
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
3600-find-the-k-th-character-in-string-game-i

Stack

0143-reorder-list
0145-binary-tree-postorder-traversal
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0682-baseball-game
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1570-final-prices-with-a-special-discount-in-a-shop
2095-minimum-number-of-swaps-to-make-the-string-balanced
2128-reverse-prefix-of-word
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Tree

0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0515-find-largest-value-in-each-tree-row
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Depth-First Search

0110-balanced-binary-tree
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0515-find-largest-value-in-each-tree-row
0676-implement-magic-dictionary
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2677-cousins-in-binary-tree-ii

Binary Tree

0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0515-find-largest-value-in-each-tree-row
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Simulation

0682-baseball-game
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2232-adding-spaces-to-a-string
2411-spiral-matrix-iv
2436-make-array-zero-by-subtracting-equal-amounts
2800-minimum-string-length-after-removing-substrings
3447-clear-digits
3600-find-the-k-th-character-in-string-game-i

Linked List

0061-rotate-list
0142-linked-list-cycle-ii
0143-reorder-list
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list

Number Theory

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

Sliding Window

0003-longest-substring-without-repeating-characters
0219-contains-duplicate-ii
1538-maximum-points-you-can-obtain-from-cards
1755-defuse-the-bomb

Monotonic Stack

1002-maximum-width-ramp
1570-final-prices-with-a-special-discount-in-a-shop

Dynamic Programming

0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
2669-find-the-substring-with-maximum-cost

Breadth-First Search

0226-invert-binary-tree
0404-sum-of-left-leaves
0515-find-largest-value-in-each-tree-row
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0812-rotate-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Database

0197-rising-temperature
0577-employee-bonus
0584-find-customer-referee
0595-big-countries
1724-customer-who-visited-but-did-not-make-any-transactions
1827-invalid-tweets
1908-recyclable-and-low-fat-products

Design

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0295-find-median-from-data-stream
0676-implement-magic-dictionary

Queue

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

Trie

0676-implement-magic-dictionary
0720-longest-word-in-dictionary

Prefix Sum

1538-maximum-points-you-can-obtain-from-cards
2721-sum-of-distances

Heap (Priority Queue)

0295-find-median-from-data-stream
2436-make-array-zero-by-subtracting-equal-amounts

Recursion

0143-reorder-list
3600-find-the-k-th-character-in-string-game-i

Data Stream

0295-find-median-from-data-stream

Divide and Conquer

0105-construct-binary-tree-from-preorder-and-inorder-traversal

Binary Search Tree

0235-lowest-common-ancestor-of-a-binary-search-tree

About

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