Skip to content

Niraj1608/Leetcode-Practise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode solutions of striver sheet

Linked List

0002-add-two-numbers
0092-reverse-linked-list-ii
0160-intersection-of-two-linked-lists

Array

0015-3sum
0026-remove-duplicates-from-sorted-array
0042-trapping-rain-water
0189-rotate-array
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0496-next-greater-element-i
0503-next-greater-element-ii
0943-sum-of-subarray-minimums
1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1552-build-an-array-with-stack-operations
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls
1878-check-if-array-is-sorted-and-rotated

Two Pointers

0015-3sum
0026-remove-duplicates-from-sorted-array
0042-trapping-rain-water
0160-intersection-of-two-linked-lists
0189-rotate-array

Math

0002-add-two-numbers
0050-powx-n
0070-climbing-stairs
0189-rotate-array
1370-count-number-of-nice-subarrays

Hash Table

0160-intersection-of-two-linked-lists
0496-next-greater-element-i
1370-count-number-of-nice-subarrays

Recursion

0002-add-two-numbers
0050-powx-n

Dynamic Programming

0042-trapping-rain-water
0070-climbing-stairs
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0943-sum-of-subarray-minimums

Stack

0020-valid-parentheses
0042-trapping-rain-water
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0496-next-greater-element-i
0503-next-greater-element-ii
0943-sum-of-subarray-minimums
1552-build-an-array-with-stack-operations

Simulation

1552-build-an-array-with-stack-operations

String

0020-valid-parentheses

Design

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

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
1037-minimum-number-of-k-consecutive-bit-flips
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Memoization

0070-climbing-stairs

Binary Search

0410-split-array-largest-sum
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls

Greedy

0410-split-array-largest-sum
1285-balance-a-binary-search-tree

Prefix Sum

0410-split-array-largest-sum
1037-minimum-number-of-k-consecutive-bit-flips

Monotonic Stack

0042-trapping-rain-water
0496-next-greater-element-i
0503-next-greater-element-ii
0943-sum-of-subarray-minimums

Sorting

0015-3sum
1675-magnetic-force-between-two-balls

Sliding Window

1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Heap (Priority Queue)

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Ordered Set

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Bit Manipulation

1037-minimum-number-of-k-consecutive-bit-flips

Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Search Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Binary Tree

1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Divide and Conquer

1285-balance-a-binary-search-tree

LeetCode Topics

Greedy

0055-jump-game
0179-largest-number
0455-assign-cookies
0678-valid-parenthesis-string
0890-lemonade-change
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1818-maximum-score-from-removing-substrings
1829-maximum-units-on-a-truck
2379-maximum-total-importance-of-roads

Graph

0547-number-of-provinces
2171-second-minimum-time-to-reach-destination
2379-maximum-total-importance-of-roads
2472-build-a-matrix-with-conditions

Sorting

0179-largest-number
0217-contains-duplicate
0350-intersection-of-two-arrays-ii
0451-sort-characters-by-frequency
0455-assign-cookies
0539-minimum-time-difference
0726-number-of-atoms
1333-sort-the-jumbled-numbers
1468-check-if-n-and-its-double-exist
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1741-sort-array-by-increasing-frequency
1829-maximum-units-on-a-truck
2379-maximum-total-importance-of-roads
2502-sort-the-people
2846-robot-collisions

Heap (Priority Queue)

0451-sort-characters-by-frequency
2379-maximum-total-importance-of-roads

Array

0055-jump-game
0179-largest-number
0217-contains-duplicate
0322-coin-change
0350-intersection-of-two-arrays-ii
0455-assign-cookies
0539-minimum-time-difference
0542-01-matrix
0733-flood-fill
0890-lemonade-change
0906-walking-robot-simulation
0966-binary-subarrays-with-sum
1036-rotting-oranges
1050-construct-binary-search-tree-from-preorder-traversal
1207-delete-nodes-and-return-forest
1333-sort-the-jumbled-numbers
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1496-lucky-numbers-in-a-matrix
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1829-maximum-units-on-a-truck
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2155-find-missing-observations
2232-adding-spaces-to-a-string
2306-create-binary-tree-from-descriptions
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2755-extra-characters-in-a-string
2846-robot-collisions
3501-delete-nodes-from-linked-list-present-in-array

Hash Table

0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0217-contains-duplicate
0350-intersection-of-two-arrays-ii
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0726-number-of-atoms
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0966-binary-subarrays-with-sum
1207-delete-nodes-and-return-forest
1468-check-if-n-and-its-double-exist
1473-find-the-longest-substring-containing-vowels-in-even-counts
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2306-create-binary-tree-from-descriptions
2502-sort-the-people
2755-extra-characters-in-a-string
3501-delete-nodes-from-linked-list-present-in-array

Two Pointers

0151-reverse-words-in-a-string
0350-intersection-of-two-arrays-ii
0455-assign-cookies
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
2232-adding-spaces-to-a-string

Binary Search

0350-intersection-of-two-arrays-ii
1468-check-if-n-and-its-double-exist
2006-find-the-student-that-will-replace-the-chalk

Stack

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0678-valid-parenthesis-string
0726-number-of-atoms
0776-n-ary-tree-postorder-traversal
1050-construct-binary-search-tree-from-preorder-traversal
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1737-maximum-nesting-depth-of-the-parentheses
1818-maximum-score-from-removing-substrings
2846-robot-collisions

Tree

0094-binary-tree-inorder-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0236-lowest-common-ancestor-of-a-binary-tree
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Binary Search Tree

0783-search-in-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal

Monotonic Stack

1050-construct-binary-search-tree-from-preorder-traversal

Binary Tree

0094-binary-tree-inorder-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0236-lowest-common-ancestor-of-a-binary-tree
0783-search-in-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Depth-First Search

0094-binary-tree-inorder-traversal
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0236-lowest-common-ancestor-of-a-binary-tree
0386-lexicographical-numbers
0547-number-of-provinces
0733-flood-fill
0776-n-ary-tree-postorder-traversal
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Linked List

0725-split-linked-list-in-parts
1484-linked-list-in-binary-tree
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Math

0013-roman-to-integer
0241-different-ways-to-add-parentheses
0539-minimum-time-difference
1642-water-bottles
1951-find-the-winner-of-the-circular-game
2155-find-missing-observations
2645-pass-the-pillow
2903-insert-greatest-common-divisors-in-linked-list

Simulation

0906-walking-robot-simulation
1642-water-bottles
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2155-find-missing-observations
2232-adding-spaces-to-a-string
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2645-pass-the-pillow
2846-robot-collisions

String

0003-longest-substring-without-repeating-characters
0008-string-to-integer-atoi
0013-roman-to-integer
0151-reverse-words-in-a-string
0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0424-longest-repeating-character-replacement
0451-sort-characters-by-frequency
0539-minimum-time-difference
0678-valid-parenthesis-string
0726-number-of-atoms
0920-uncommon-words-from-two-sentences
1250-longest-common-subsequence
1298-reverse-substrings-between-each-pair-of-parentheses
1473-find-the-longest-substring-containing-vowels-in-even-counts
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1720-crawler-log-folder
1737-maximum-nesting-depth-of-the-parentheses
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
2076-sum-of-digits-of-string-after-convert
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2232-adding-spaces-to-a-string
2502-sort-the-people
2755-extra-characters-in-a-string

Sliding Window

0003-longest-substring-without-repeating-characters
0424-longest-repeating-character-replacement
0966-binary-subarrays-with-sum

Prefix Sum

0966-binary-subarrays-with-sum
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
2006-find-the-student-that-will-replace-the-chalk

Recursion

0241-different-ways-to-add-parentheses
1951-find-the-winner-of-the-circular-game

Queue

1951-find-the-winner-of-the-circular-game

Breadth-First Search

0104-maximum-depth-of-binary-tree
0322-coin-change
0542-01-matrix
0547-number-of-provinces
0733-flood-fill
1036-rotting-oranges
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2171-second-minimum-time-to-reach-destination

Matrix

0542-01-matrix
0733-flood-fill
1036-rotting-oranges
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
2035-count-sub-islands
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions

Topological Sort

2472-build-a-matrix-with-conditions

Shortest Path

2171-second-minimum-time-to-reach-destination

Strongly Connected Component

1691-minimum-number-of-days-to-disconnect-island

Dynamic Programming

0055-jump-game
0241-different-ways-to-add-parentheses
0322-coin-change
0542-01-matrix
0678-valid-parenthesis-string
1250-longest-common-subsequence
2755-extra-characters-in-a-string

Union Find

0547-number-of-provinces
2035-count-sub-islands

Bucket Sort

0451-sort-characters-by-frequency

Counting

0451-sort-characters-by-frequency
0920-uncommon-words-from-two-sentences
1786-count-the-number-of-consistent-strings

Number Theory

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

Bit Manipulation

1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and

Memoization

0241-different-ways-to-add-parentheses

Rolling Hash

0214-shortest-palindrome

String Matching

0214-shortest-palindrome
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Hash Function

0214-shortest-palindrome

Trie

0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
2755-extra-characters-in-a-string

About

leetcode soultions with python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published