Skip to content

kjayasravani/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

leetcode practice problems

LeetCode Topics

Math

0043-multiply-strings
0189-rotate-array
0231-power-of-two
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0273-integer-to-english-words
0412-fizz-buzz
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0870-magic-squares-in-grid
1240-stone-game-ii
1610-xor-operation-in-an-array
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

0043-multiply-strings
0054-spiral-matrix
0412-fizz-buzz
0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
1642-water-bottles
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2058-concatenation-of-array
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2155-find-missing-observations
2299-merge-nodes-in-between-zeros
2411-spiral-matrix-iv
2645-pass-the-pillow
2846-robot-collisions
3311-ant-on-the-boundary

Linked List

0234-palindrome-linked-list
0725-split-linked-list-in-parts
1484-linked-list-in-binary-tree
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

Array

0001-two-sum
0026-remove-duplicates-from-sorted-array
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0040-combination-sum-ii
0054-spiral-matrix
0081-search-in-rotated-sorted-array-ii
0084-largest-rectangle-in-histogram
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0179-largest-number
0189-rotate-array
0283-move-zeroes
0485-max-consecutive-ones
0539-minimum-time-difference
0540-single-element-in-a-sorted-array
0624-maximum-distance-in-arrays
0719-find-k-th-smallest-pair-distance
0792-binary-search
0870-magic-squares-in-grid
0890-lemonade-change
0906-walking-robot-simulation
0921-spiral-matrix-iii
0948-sort-an-array
0999-regions-cut-by-slashes
1046-max-consecutive-ones-iii
1196-filling-bookcase-shelves
1207-delete-nodes-and-return-forest
1240-stone-game-ii
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
1435-xor-queries-of-a-subarray
1496-lucky-numbers-in-a-matrix
1511-count-number-of-teams
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1691-minimum-number-of-days-to-disconnect-island
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2058-concatenation-of-array
2067-maximum-number-of-points-with-cost
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2190-count-common-words-with-one-occurrence
2255-minimum-swaps-to-group-all-1s-together-ii
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
2727-number-of-senior-citizens
2846-robot-collisions
3194-find-words-containing-character
3235-minimum-cost-to-convert-string-i
3311-ant-on-the-boundary
3501-delete-nodes-from-linked-list-present-in-array

Two Pointers

0026-remove-duplicates-from-sorted-array
0189-rotate-array
0234-palindrome-linked-list
0283-move-zeroes
0557-reverse-words-in-a-string-iii
0719-find-k-th-smallest-pair-distance
1615-range-sum-of-sorted-subarray-sums

Stack

0084-largest-rectangle-in-histogram
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0776-n-ary-tree-postorder-traversal
1298-reverse-substrings-between-each-pair-of-parentheses
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1818-maximum-score-from-removing-substrings
2846-robot-collisions

Monotonic Stack

0084-largest-rectangle-in-histogram

Recursion

0231-power-of-two
0234-palindrome-linked-list
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
1951-find-the-winner-of-the-circular-game

Queue

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

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0540-single-element-in-a-sorted-array
0719-find-k-th-smallest-pair-distance
0792-binary-search
1046-max-consecutive-ones-iii
1615-range-sum-of-sorted-subarray-sums
2006-find-the-student-that-will-replace-the-chalk

String

0003-longest-substring-without-repeating-characters
0014-longest-common-prefix
0043-multiply-strings
0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0412-fizz-buzz
0539-minimum-time-difference
0557-reverse-words-in-a-string-iii
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0664-strange-printer
0920-uncommon-words-from-two-sentences
1205-defanging-an-ip-address
1298-reverse-substrings-between-each-pair-of-parentheses
1473-find-the-longest-substring-containing-vowels-in-even-counts
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
2076-sum-of-digits-of-string-after-convert
2137-final-value-of-variable-after-performing-operations
2163-kth-distinct-string-in-an-array
2190-count-common-words-with-one-occurrence
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2502-sort-the-people
2727-number-of-senior-citizens
3194-find-words-containing-character
3235-minimum-cost-to-convert-string-i
3276-minimum-number-of-pushes-to-type-word-ii

Prefix Sum

1046-max-consecutive-ones-iii
1240-stone-game-ii
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
3311-ant-on-the-boundary

Greedy

0179-largest-number
0624-maximum-distance-in-arrays
0890-lemonade-change
1818-maximum-score-from-removing-substrings
3276-minimum-number-of-pushes-to-type-word-ii

Sorting

0179-largest-number
0539-minimum-time-difference
0719-find-k-th-smallest-pair-distance
0948-sort-an-array
1333-sort-the-jumbled-numbers
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1741-sort-array-by-increasing-frequency
2502-sort-the-people
2846-robot-collisions
3276-minimum-number-of-pushes-to-type-word-ii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0264-ugly-number-ii
0870-magic-squares-in-grid
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1207-delete-nodes-and-return-forest
1473-find-the-longest-substring-containing-vowels-in-even-counts
1556-make-two-arrays-equal-by-reversing-subarrays
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2190-count-common-words-with-one-occurrence
2306-create-binary-tree-from-descriptions
2502-sort-the-people
3276-minimum-number-of-pushes-to-type-word-ii
3501-delete-nodes-from-linked-list-present-in-array

Tree

0145-binary-tree-postorder-traversal
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Binary Tree

0145-binary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions

Depth-First Search

0145-binary-tree-postorder-traversal
0386-lexicographical-numbers
0776-n-ary-tree-postorder-traversal
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
1653-number-of-good-leaf-nodes-pairs
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2217-step-by-step-directions-from-a-binary-tree-node-to-another

Bit Manipulation

0191-number-of-1-bits
0231-power-of-two
0476-number-complement
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1610-xor-operation-in-an-array
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and

Divide and Conquer

0191-number-of-1-bits
0948-sort-an-array

Matrix

0054-spiral-matrix
0870-magic-squares-in-grid
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions

Graph

0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2472-build-a-matrix-with-conditions
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

Topological Sort

2472-build-a-matrix-with-conditions

Heap (Priority Queue)

0264-ugly-number-ii
0789-kth-largest-element-in-a-stream
0948-sort-an-array
1325-path-with-maximum-probability
2803-modify-graph-edge-weights

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0920-uncommon-words-from-two-sentences
0948-sort-an-array
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2190-count-common-words-with-one-occurrence
3276-minimum-number-of-pushes-to-type-word-ii

Dynamic Programming

0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0650-2-keys-keyboard
0664-strange-printer
1196-filling-bookcase-shelves
1240-stone-game-ii
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost

Shortest Path

1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2803-modify-graph-edge-weights
3235-minimum-cost-to-convert-string-i

Breadth-First Search

0999-regions-cut-by-slashes
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

Binary Indexed Tree

1511-count-number-of-teams

Sliding Window

0003-longest-substring-without-repeating-characters
1046-max-consecutive-ones-iii
2255-minimum-swaps-to-group-all-1s-together-ii

Union Find

0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
2035-count-sub-islands

Strongly Connected Component

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

Design

0789-kth-largest-element-in-a-stream

Binary Search Tree

0789-kth-largest-element-in-a-stream

Data Stream

0789-kth-largest-element-in-a-stream

Backtracking

0040-combination-sum-ii

Game Theory

1240-stone-game-ii

Trie

0014-longest-common-prefix
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order

Number Theory

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

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

Hash Function

0214-shortest-palindrome

About

leetcode practice problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages