Skip to content

TheVinaySagar/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode

this is readme. here i will make

LeetCode Topics

Array

0106-construct-binary-tree-from-inorder-and-postorder-traversal
0121-best-time-to-buy-and-sell-stock
0130-surrounded-regions
0407-trapping-rain-water-ii
0542-01-matrix
0733-flood-fill
0854-making-a-large-island
0905-length-of-longest-fibonacci-subsequence
0952-word-subsets
1002-maximum-width-ramp
1036-rotting-oranges
1073-number-of-enclaves
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1477-product-of-the-last-k-numbers
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1524-string-matching-in-an-array
1819-construct-the-lexicographically-largest-valid-sequence
1849-maximum-absolute-sum-of-any-subarray
1876-map-of-highest-peak
1878-check-if-array-is-sorted-and-rotated
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1927-maximum-ascending-subarray-sum
2107-find-unique-binary-string
2145-grid-game
2265-partition-array-according-to-given-pivot
2292-counting-words-with-a-given-prefix
2435-shortest-impossible-sequence-of-rolls
2448-count-number-of-bad-pairs
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2564-most-profitable-path-in-a-tree
2685-first-completely-painted-row-or-column
2764-maximum-number-of-fish-in-a-grid
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
3227-find-missing-and-repeated-values
3309-count-prefix-and-suffix-pairs-i
3332-minimum-operations-to-exceed-threshold-value-ii
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3429-special-array-i
3483-alternating-groups-ii
3657-check-if-grid-can-be-cut-into-sections

String

0297-serialize-and-deserialize-binary-tree
0952-word-subsets
1093-recover-a-tree-from-preorder-traversal
1170-shortest-common-supersequence
1460-number-of-substrings-containing-all-three-characters
1502-construct-k-palindrome-strings
1524-string-matching-in-an-array
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
2021-remove-all-occurrences-of-a-substring
2107-find-unique-binary-string
2221-check-if-a-parentheses-string-can-be-valid
2292-counting-words-with-a-given-prefix
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2465-shifting-letters-ii
3309-count-prefix-and-suffix-pairs-i
3447-clear-digits
3455-minimum-length-of-string-after-operations
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii

Prefix Sum

1477-product-of-the-last-k-numbers
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2145-grid-game
2465-shifting-letters-ii

String Matching

1524-string-matching-in-an-array
2292-counting-words-with-a-given-prefix
3309-count-prefix-and-suffix-pairs-i

Hash Table

0106-construct-binary-tree-from-inorder-and-postorder-traversal
0893-all-nodes-distance-k-in-binary-tree
0905-length-of-longest-fibonacci-subsequence
0952-word-subsets
1029-vertical-order-traversal-of-a-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1460-number-of-substrings-containing-all-three-characters
1502-construct-k-palindrome-strings
1915-check-if-one-string-swap-can-make-strings-equal
2107-find-unique-binary-string
2434-design-a-number-container-system
2435-shortest-impossible-sequence-of-rolls
2448-count-number-of-bad-pairs
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2685-first-completely-painted-row-or-column
2766-find-the-prefix-common-array-of-two-arrays
3227-find-missing-and-repeated-values
3455-minimum-length-of-string-after-operations
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii

Tree

0101-symmetric-tree
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0662-maximum-width-of-binary-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0893-all-nodes-distance-k-in-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-binary-tree
2564-most-profitable-path-in-a-tree
3439-find-minimum-diameter-after-merging-two-trees

Depth-First Search

0101-symmetric-tree
0130-surrounded-regions
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0547-number-of-provinces
0662-maximum-width-of-binary-tree
0684-redundant-connection
0733-flood-fill
0801-is-graph-bipartite
0854-making-a-large-island
0893-all-nodes-distance-k-in-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1073-number-of-enclaves
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1558-course-schedule-iv
2564-most-profitable-path-in-a-tree
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
3439-find-minimum-diameter-after-merging-two-trees

Breadth-First Search

0101-symmetric-tree
0130-surrounded-regions
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0297-serialize-and-deserialize-binary-tree
0407-trapping-rain-water-ii
0542-01-matrix
0547-number-of-provinces
0662-maximum-width-of-binary-tree
0684-redundant-connection
0733-flood-fill
0801-is-graph-bipartite
0854-making-a-large-island
0893-all-nodes-distance-k-in-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1036-rotting-oranges
1073-number-of-enclaves
1387-find-elements-in-a-contaminated-binary-tree
1396-count-servers-that-communicate
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1876-map-of-highest-peak
2564-most-profitable-path-in-a-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components
3439-find-minimum-diameter-after-merging-two-trees

Sorting

1029-vertical-order-traversal-of-a-binary-tree
2473-max-sum-of-a-pair-with-equal-sum-of-digits
3657-check-if-grid-can-be-cut-into-sections

Binary Tree

0101-symmetric-tree
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0662-maximum-width-of-binary-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0893-all-nodes-distance-k-in-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1093-recover-a-tree-from-preorder-traversal
1387-find-elements-in-a-contaminated-binary-tree

Trie

3309-count-prefix-and-suffix-pairs-i

Rolling Hash

3309-count-prefix-and-suffix-pairs-i

Hash Function

3309-count-prefix-and-suffix-pairs-i

Dynamic Programming

0121-best-time-to-buy-and-sell-stock
0542-01-matrix
0905-length-of-longest-fibonacci-subsequence
1170-shortest-common-supersequence
1402-count-square-submatrices-with-all-ones
1849-maximum-absolute-sum-of-any-subarray

Binary Search

0222-count-complete-tree-nodes

Bit Manipulation

0222-count-complete-tree-nodes
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor

Greedy

1502-construct-k-palindrome-strings
2221-check-if-a-parentheses-string-can-be-valid
2435-shortest-impossible-sequence-of-rolls
2509-minimize-xor

Counting

1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1915-check-if-one-string-swap-can-make-strings-equal
2448-count-number-of-bad-pairs
3455-minimum-length-of-string-after-operations

Stack

1002-maximum-width-ramp
2021-remove-all-occurrences-of-a-substring
2221-check-if-a-parentheses-string-can-be-valid
3447-clear-digits

Brainteaser

2533-bitwise-xor-of-all-pairings

Divide and Conquer

0106-construct-binary-tree-from-inorder-and-postorder-traversal

Design

0297-serialize-and-deserialize-binary-tree
1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers
2434-design-a-number-container-system

Graph

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0684-redundant-connection
0801-is-graph-bipartite
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
2564-most-profitable-path-in-a-tree
2583-divide-nodes-into-the-maximum-number-of-groups
2793-count-the-number-of-complete-components
3439-find-minimum-diameter-after-merging-two-trees

Heap (Priority Queue)

0407-trapping-rain-water-ii
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
2434-design-a-number-container-system
2473-max-sum-of-a-pair-with-equal-sum-of-digits
3332-minimum-operations-to-exceed-threshold-value-ii

Matrix

0130-surrounded-regions
0407-trapping-rain-water-ii
0542-01-matrix
0733-flood-fill
0854-making-a-large-island
1036-rotting-oranges
1073-number-of-enclaves
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1876-map-of-highest-peak
2145-grid-game
2685-first-completely-painted-row-or-column
2764-maximum-number-of-fish-in-a-grid
3227-find-missing-and-repeated-values

Shortest Path

1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid

Union Find

0130-surrounded-regions
0547-number-of-provinces
0684-redundant-connection
0801-is-graph-bipartite
0854-making-a-large-island
1073-number-of-enclaves
1396-count-servers-that-communicate
2583-divide-nodes-into-the-maximum-number-of-groups
2764-maximum-number-of-fish-in-a-grid
2793-count-the-number-of-complete-components

Binary Search Tree

0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree

Topological Sort

0207-course-schedule
0210-course-schedule-ii
1558-course-schedule-iv

Ordered Set

2434-design-a-number-container-system

Math

1477-product-of-the-last-k-numbers
1889-check-if-number-is-a-sum-of-powers-of-three
2448-count-number-of-bad-pairs
2610-closest-prime-numbers-in-range
2649-count-total-number-of-colored-cells
3227-find-missing-and-repeated-values

Simulation

2021-remove-all-occurrences-of-a-substring
2265-partition-array-according-to-given-pivot
2551-apply-operations-to-an-array
3332-minimum-operations-to-exceed-threshold-value-ii
3447-clear-digits

Data Stream

1477-product-of-the-last-k-numbers

Backtracking

1819-construct-the-lexicographically-largest-valid-sequence
2107-find-unique-binary-string

Two Pointers

1002-maximum-width-ramp
2265-partition-array-according-to-given-pivot
2551-apply-operations-to-an-array

Monotonic Stack

1002-maximum-width-ramp

Number Theory

2610-closest-prime-numbers-in-range

Sliding Window

1460-number-of-substrings-containing-all-three-characters
2463-minimum-recolors-to-get-k-consecutive-black-blocks
3483-alternating-groups-ii
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published