Skip to content

NguyenHuuDinh135/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Array

0001-two-sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0045-jump-game-ii
0046-permutations
0047-permutations-ii
0053-maximum-subarray
0055-jump-game
0066-plus-one
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0136-single-number
0137-single-number-ii
0139-word-break
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0198-house-robber
0217-contains-duplicate
0219-contains-duplicate-ii
0228-summary-ranges
0260-single-number-iii
0268-missing-number
0274-h-index
0283-move-zeroes
0350-intersection-of-two-arrays-ii
0414-third-maximum-number
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0485-max-consecutive-ones
0495-teemo-attacking
0540-single-element-in-a-sorted-array
0792-binary-search
1001-n-repeated-element-in-size-2n-array
1019-squares-of-a-sorted-array
1421-find-numbers-with-even-number-of-digits
1482-how-many-numbers-are-smaller-than-the-current-number
1486-find-the-distance-value-between-two-arrays
1528-kids-with-the-greatest-number-of-candies
1580-shuffle-the-array
1603-running-sum-of-1d-array
1651-shuffle-string
1791-richest-customer-wealth

Hash Table

0001-two-sum
0012-integer-to-roman
0013-roman-to-integer
0128-longest-consecutive-sequence
0139-word-break
0141-linked-list-cycle
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0268-missing-number
0290-word-pattern
0350-intersection-of-two-arrays-ii
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0448-find-all-numbers-disappeared-in-an-array
0451-sort-characters-by-frequency
0782-jewels-and-stones
1001-n-repeated-element-in-size-2n-array
1482-how-many-numbers-are-smaller-than-the-current-number

Prefix Sum

1603-running-sum-of-1d-array

Matrix

1791-richest-customer-wealth

Math

0002-add-two-numbers
0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0066-plus-one
0067-add-binary
0070-climbing-stairs
0189-rotate-array
0202-happy-number
0268-missing-number
0412-fizz-buzz
1013-fibonacci-number
1421-find-numbers-with-even-number-of-digits
1444-number-of-steps-to-reduce-a-number-to-zero

String

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
0058-length-of-last-word
0067-add-binary
0125-valid-palindrome
0139-word-break
0205-isomorphic-strings
0242-valid-anagram
0290-word-pattern
0344-reverse-string
0345-reverse-vowels-of-a-string
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0392-is-subsequence
0412-fizz-buzz
0434-number-of-segments-in-a-string
0451-sort-characters-by-frequency
0557-reverse-words-in-a-string-iii
0742-to-lower-case
0782-jewels-and-stones
1205-defanging-an-ip-address
1651-shuffle-string

Simulation

0067-add-binary
0412-fizz-buzz
0495-teemo-attacking

Bit Manipulation

0067-add-binary
0136-single-number
0137-single-number-ii
0191-number-of-1-bits
0222-count-complete-tree-nodes
0260-single-number-iii
0268-missing-number
0389-find-the-difference
1444-number-of-steps-to-reduce-a-number-to-zero

Linked List

0002-add-two-numbers
0021-merge-two-sorted-lists
0083-remove-duplicates-from-sorted-list
0141-linked-list-cycle
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0908-middle-of-the-linked-list

Two Pointers

0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0344-reverse-string
0345-reverse-vowels-of-a-string
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0455-assign-cookies
0557-reverse-words-in-a-string-iii
0908-middle-of-the-linked-list
1019-squares-of-a-sorted-array
1486-find-the-distance-value-between-two-arrays

Counting

0169-majority-element
0383-ransom-note
0387-first-unique-character-in-a-string
0451-sort-characters-by-frequency

Sorting

0047-permutations-ii
0088-merge-sorted-array
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0274-h-index
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0414-third-maximum-number
0451-sort-characters-by-frequency
0455-assign-cookies
1019-squares-of-a-sorted-array
1482-how-many-numbers-are-smaller-than-the-current-number
1486-find-the-distance-value-between-two-arrays

Dynamic Programming

0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0070-climbing-stairs
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0139-word-break
0198-house-robber
0392-is-subsequence
1013-fibonacci-number

Memoization

0070-climbing-stairs
0139-word-break
1013-fibonacci-number

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0234-palindrome-linked-list

Tree

0094-binary-tree-inorder-traversal
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
0108-convert-sorted-array-to-binary-search-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0637-average-of-levels-in-binary-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0637-average-of-levels-in-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
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
0108-convert-sorted-array-to-binary-search-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0637-average-of-levels-in-binary-tree

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
0111-minimum-depth-of-binary-tree
0112-path-sum
0199-binary-tree-right-side-view
0226-invert-binary-tree
0637-average-of-levels-in-binary-tree

Divide and Conquer

0053-maximum-subarray
0108-convert-sorted-array-to-binary-search-tree
0169-majority-element
0191-number-of-1-bits

Binary Search Tree

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0108-convert-sorted-array-to-binary-search-tree
0167-two-sum-ii-input-array-is-sorted
0222-count-complete-tree-nodes
0268-missing-number
0350-intersection-of-two-arrays-ii
0540-single-element-in-a-sorted-array
0792-binary-search
1486-find-the-distance-value-between-two-arrays

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
1013-fibonacci-number

String Matching

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

Trie

0014-longest-common-prefix
0139-word-break

Queue

0387-first-unique-character-in-a-string

Heap (Priority Queue)

0451-sort-characters-by-frequency

Bucket Sort

0451-sort-characters-by-frequency

Counting Sort

0274-h-index
1482-how-many-numbers-are-smaller-than-the-current-number

Backtracking

0046-permutations
0047-permutations-ii

Design

0155-min-stack

Union Find

0128-longest-consecutive-sequence

Sliding Window

0219-contains-duplicate-ii

Greedy

0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0455-assign-cookies

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published