Skip to content

shivgez/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

645 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

LeetCode Topics

Array

0001-two-sum
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0046-permutations
0053-maximum-subarray
0054-spiral-matrix
0066-plus-one
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0081-search-in-rotated-sorted-array-ii
0085-maximal-rectangle
0088-merge-sorted-array
0090-subsets-ii
0121-best-time-to-buy-and-sell-stock
0136-single-number
0162-find-peak-element
0169-majority-element
0189-rotate-array
0200-number-of-islands
0204-count-primes
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0219-contains-duplicate-ii
0238-product-of-array-except-self
0240-search-a-2d-matrix-ii
0268-missing-number
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
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
0540-single-element-in-a-sorted-array
0695-max-area-of-island
0704-binary-search
0733-flood-fill
0832-flipping-an-image
0852-peak-index-in-a-mountain-array
0867-transpose-matrix
0912-sort-an-array
0961-n-repeated-element-in-size-2n-array
0994-rotting-oranges
1020-number-of-enclaves
1051-height-checker
1266-minimum-time-visiting-all-points
1337-the-k-weakest-rows-in-a-matrix
1346-check-if-n-and-its-double-exist
1390-four-divisors
1458-max-dot-product-of-two-subsequences
1539-kth-missing-positive-number
1572-matrix-diagonal-sum
1975-maximum-matrix-sum
2089-find-target-indices-after-sorting-array
2946-matrix-similarity-after-cyclic-shifts

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0169-majority-element
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0387-first-unique-character-in-a-string
0389-find-the-difference
0448-find-all-numbers-disappeared-in-an-array
0567-permutation-in-string
0865-smallest-subtree-with-all-the-deepest-nodes
0961-n-repeated-element-in-size-2n-array
1346-check-if-n-and-its-double-exist

Bit Manipulation

0078-subsets
0090-subsets-ii
0136-single-number
0231-power-of-two
0268-missing-number
0287-find-the-duplicate-number
0342-power-of-four
0389-find-the-difference
0832-flipping-an-image

Divide and Conquer

0053-maximum-subarray
0169-majority-element
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii
0912-sort-an-array

Dynamic Programming

0053-maximum-subarray
0085-maximal-rectangle
0121-best-time-to-buy-and-sell-stock
0392-is-subsequence
0509-fibonacci-number
0712-minimum-ascii-delete-sum-for-two-strings
1411-number-of-ways-to-paint-n-3-grid
1458-max-dot-product-of-two-subsequences

Sorting

0015-3sum
0075-sort-colors
0088-merge-sorted-array
0169-majority-element
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0414-third-maximum-number
0455-assign-cookies
0912-sort-an-array
1051-height-checker
1337-the-k-weakest-rows-in-a-matrix
1346-check-if-n-and-its-double-exist
2089-find-target-indices-after-sorting-array

Counting

0169-majority-element
0387-first-unique-character-in-a-string

String

0003-longest-substring-without-repeating-characters
0014-longest-common-prefix
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0058-length-of-last-word
0125-valid-palindrome
0151-reverse-words-in-a-string
0242-valid-anagram
0344-reverse-string
0345-reverse-vowels-of-a-string
0387-first-unique-character-in-a-string
0389-find-the-difference
0392-is-subsequence
0443-string-compression
0520-detect-capital
0541-reverse-string-ii
0567-permutation-in-string
0712-minimum-ascii-delete-sum-for-two-strings
1910-remove-all-occurrences-of-a-substring

Trie

0014-longest-common-prefix

Two Pointers

0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0075-sort-colors
0088-merge-sorted-array
0125-valid-palindrome
0151-reverse-words-in-a-string
0189-rotate-array
0283-move-zeroes
0287-find-the-duplicate-number
0344-reverse-string
0345-reverse-vowels-of-a-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0443-string-compression
0455-assign-cookies
0541-reverse-string-ii
0567-permutation-in-string
0832-flipping-an-image
0876-middle-of-the-linked-list
1346-check-if-n-and-its-double-exist

Math

0007-reverse-integer
0009-palindrome-number
0050-powx-n
0066-plus-one
0069-sqrtx
0189-rotate-array
0204-count-primes
0231-power-of-two
0258-add-digits
0268-missing-number
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0509-fibonacci-number
1266-minimum-time-visiting-all-points
1390-four-divisors
2946-matrix-similarity-after-cyclic-shifts

Greedy

0011-container-with-most-water
0455-assign-cookies
1975-maximum-matrix-sum

Prefix Sum

0238-product-of-array-except-self

Matrix

0054-spiral-matrix
0074-search-a-2d-matrix
0085-maximal-rectangle
0200-number-of-islands
0240-search-a-2d-matrix-ii
0695-max-area-of-island
0733-flood-fill
0832-flipping-an-image
0867-transpose-matrix
0994-rotting-oranges
1020-number-of-enclaves
1337-the-k-weakest-rows-in-a-matrix
1572-matrix-diagonal-sum
1975-maximum-matrix-sum
2946-matrix-similarity-after-cyclic-shifts

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0081-search-in-rotated-sorted-array-ii
0162-find-peak-element
0240-search-a-2d-matrix-ii
0268-missing-number
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0540-single-element-in-a-sorted-array
0704-binary-search
0852-peak-index-in-a-mountain-array
1337-the-k-weakest-rows-in-a-matrix
1346-check-if-n-and-its-double-exist
1539-kth-missing-positive-number
2089-find-target-indices-after-sorting-array

Tree

0865-smallest-subtree-with-all-the-deepest-nodes
1161-maximum-level-sum-of-a-binary-tree
1339-maximum-product-of-splitted-binary-tree

Depth-First Search

0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0695-max-area-of-island
0733-flood-fill
0785-is-graph-bipartite
0865-smallest-subtree-with-all-the-deepest-nodes
1020-number-of-enclaves
1161-maximum-level-sum-of-a-binary-tree
1339-maximum-product-of-splitted-binary-tree
1971-find-if-path-exists-in-graph

Breadth-First Search

0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0695-max-area-of-island
0733-flood-fill
0785-is-graph-bipartite
0865-smallest-subtree-with-all-the-deepest-nodes
0994-rotting-oranges
1020-number-of-enclaves
1161-maximum-level-sum-of-a-binary-tree
1971-find-if-path-exists-in-graph

Binary Tree

0865-smallest-subtree-with-all-the-deepest-nodes
1161-maximum-level-sum-of-a-binary-tree
1339-maximum-product-of-splitted-binary-tree

Stack

0020-valid-parentheses
0085-maximal-rectangle
1910-remove-all-occurrences-of-a-substring

Monotonic Stack

0085-maximal-rectangle

Geometry

1266-minimum-time-visiting-all-points

Recursion

0050-powx-n
0231-power-of-two
0326-power-of-three
0342-power-of-four
0509-fibonacci-number

Queue

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

Sliding Window

0003-longest-substring-without-repeating-characters
0219-contains-duplicate-ii
0567-permutation-in-string

String Matching

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

Simulation

0054-spiral-matrix
0258-add-digits
0832-flipping-an-image
0867-transpose-matrix
1910-remove-all-occurrences-of-a-substring
2946-matrix-similarity-after-cyclic-shifts

Number Theory

0204-count-primes
0258-add-digits

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0912-sort-an-array
1337-the-k-weakest-rows-in-a-matrix

Quickselect

0215-kth-largest-element-in-an-array

Memoization

0509-fibonacci-number

Merge Sort

0912-sort-an-array

Bucket Sort

0912-sort-an-array

Radix Sort

0912-sort-an-array

Counting Sort

0912-sort-an-array
1051-height-checker

Backtracking

0046-permutations
0078-subsets
0090-subsets-ii

Linked List

0019-remove-nth-node-from-end-of-list
0083-remove-duplicates-from-sorted-list
0237-delete-node-in-a-linked-list
0876-middle-of-the-linked-list

Union-Find

0200-number-of-islands
0547-number-of-provinces
0695-max-area-of-island
0785-is-graph-bipartite
1020-number-of-enclaves
1971-find-if-path-exists-in-graph

Graph Theory

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0785-is-graph-bipartite
1971-find-if-path-exists-in-graph

Topological Sort

0207-course-schedule
0210-course-schedule-ii

Enumeration

0204-count-primes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages