Skip to content

A 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

M3IJI3/leetcode_solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode_solution

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

See more about solutions at my Notion

LeetCode Topics

Array

0001-two-sum
0011-container-with-most-water
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0035-search-insert-position
0036-valid-sudoku
0042-trapping-rain-water
0045-jump-game-ii
0054-spiral-matrix
0055-jump-game
0066-plus-one
0068-text-justification
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0134-gas-station
0135-candy
0152-maximum-product-subarray
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0238-product-of-array-except-self
0274-h-index
0413-arithmetic-slices
0594-longest-harmonious-subsequence
0643-maximum-average-subarray-i
0658-find-k-closest-elements
0713-subarray-product-less-than-k
0966-binary-subarrays-with-sum
1020-longest-turbulent-subarray
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1586-longest-subarray-of-1s-after-deleting-one-element
1755-defuse-the-bomb
1776-minimum-operations-to-reduce-x-to-zero
1813-maximum-erasure-value
1966-frequency-of-the-most-frequent-element
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2866-longest-even-odd-subarray-with-threshold

Math

0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0189-rotate-array
1370-count-number-of-nice-subarrays
1430-find-the-k-beauty-of-a-number

Hash Table

0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0030-substring-with-concatenation-of-all-words
0036-valid-sudoku
0169-majority-element
0187-repeated-dna-sequences
0205-isomorphic-strings
0219-contains-duplicate-ii
0242-valid-anagram
0290-word-pattern
0383-ransom-note
0395-longest-substring-with-at-least-k-repeating-characters
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0594-longest-harmonious-subsequence
0966-binary-subarrays-with-sum
1261-swap-for-longest-repeated-character-substring
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1776-minimum-operations-to-reduce-x-to-zero
1813-maximum-erasure-value
1873-longest-nice-substring
1987-substrings-of-size-three-with-distinct-characters
3349-maximum-length-substring-with-two-occurrences

String

0003-longest-substring-without-repeating-characters
0006-zigzag-conversion
0012-integer-to-roman
0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0030-substring-with-concatenation-of-all-words
0058-length-of-last-word
0067-add-binary
0068-text-justification
0125-valid-palindrome
0151-reverse-words-in-a-string
0187-repeated-dna-sequences
0205-isomorphic-strings
0242-valid-anagram
0290-word-pattern
0383-ransom-note
0392-is-subsequence
0395-longest-substring-with-at-least-k-repeating-characters
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
1261-swap-for-longest-repeated-character-substring
1321-get-equal-substrings-within-budget
1351-replace-the-substring-for-balanced-string
1430-find-the-k-beauty-of-a-number
1460-number-of-substrings-containing-all-three-characters
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1873-longest-nice-substring
1987-substrings-of-size-three-with-distinct-characters
2463-minimum-recolors-to-get-k-consecutive-black-blocks
3349-maximum-length-substring-with-two-occurrences

Stack

0020-valid-parentheses
0042-trapping-rain-water
0094-binary-tree-inorder-traversal

Linked List

0021-merge-two-sorted-lists
0083-remove-duplicates-from-sorted-list

Recursion

0021-merge-two-sorted-lists

Two Pointers

0011-container-with-most-water
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0125-valid-palindrome
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0392-is-subsequence
0658-find-k-closest-elements

String Matching

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

Binary Search

0035-search-insert-position
0069-sqrtx
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0658-find-k-closest-elements
0713-subarray-product-less-than-k
1046-max-consecutive-ones-iii
1321-get-equal-substrings-within-budget
1776-minimum-operations-to-reduce-x-to-zero
1966-frequency-of-the-most-frequent-element

Bit Manipulation

0067-add-binary
0187-repeated-dna-sequences
1873-longest-nice-substring

Simulation

0054-spiral-matrix
0067-add-binary
0068-text-justification

Dynamic Programming

0042-trapping-rain-water
0045-jump-game-ii
0055-jump-game
0070-climbing-stairs
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0152-maximum-product-subarray
0392-is-subsequence
0413-arithmetic-slices
1020-longest-turbulent-subarray
1586-longest-subarray-of-1s-after-deleting-one-element

Memoization

0070-climbing-stairs

Sorting

0015-3sum
0088-merge-sorted-array
0169-majority-element
0242-valid-anagram
0274-h-index
0594-longest-harmonious-subsequence
0658-find-k-closest-elements
1966-frequency-of-the-most-frequent-element
2112-minimum-difference-between-highest-and-lowest-of-k-scores

Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree
0169-majority-element
0395-longest-substring-with-at-least-k-repeating-characters
1873-longest-nice-substring

Binary Search Tree

0108-convert-sorted-array-to-binary-search-tree

Counting

0169-majority-element
0383-ransom-note
0594-longest-harmonious-subsequence
1987-substrings-of-size-three-with-distinct-characters

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0134-gas-station
0135-candy
1966-frequency-of-the-most-frequent-element

Counting Sort

0274-h-index

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0713-subarray-product-less-than-k
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1321-get-equal-substrings-within-budget
1370-count-number-of-nice-subarrays
1776-minimum-operations-to-reduce-x-to-zero
1966-frequency-of-the-most-frequent-element

Monotonic Stack

0042-trapping-rain-water

Trie

0014-longest-common-prefix

Sliding Window

0003-longest-substring-without-repeating-characters
0030-substring-with-concatenation-of-all-words
0187-repeated-dna-sequences
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0395-longest-substring-with-at-least-k-repeating-characters
0413-arithmetic-slices
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0594-longest-harmonious-subsequence
0643-maximum-average-subarray-i
0658-find-k-closest-elements
0713-subarray-product-less-than-k
0966-binary-subarrays-with-sum
1020-longest-turbulent-subarray
1046-max-consecutive-ones-iii
1261-swap-for-longest-repeated-character-substring
1321-get-equal-substrings-within-budget
1351-replace-the-substring-for-balanced-string
1370-count-number-of-nice-subarrays
1430-find-the-k-beauty-of-a-number
1460-number-of-substrings-containing-all-three-characters
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1586-longest-subarray-of-1s-after-deleting-one-element
1755-defuse-the-bomb
1776-minimum-operations-to-reduce-x-to-zero
1813-maximum-erasure-value
1873-longest-nice-substring
1966-frequency-of-the-most-frequent-element
1987-substrings-of-size-three-with-distinct-characters
2112-minimum-difference-between-highest-and-lowest-of-k-scores
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2866-longest-even-odd-subarray-with-threshold
3349-maximum-length-substring-with-two-occurrences

Rolling Hash

0187-repeated-dna-sequences

Hash Function

0187-repeated-dna-sequences

Heap (Priority Queue)

0658-find-k-closest-elements

Matrix

0036-valid-sudoku
0054-spiral-matrix

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

Languages