Skip to content

prudhvideep/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

Linked List

0024-swap-nodes-in-pairs
0086-partition-list
0092-reverse-linked-list-ii
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0138-copy-list-with-random-pointer
0142-linked-list-cycle-ii
0146-lru-cache
0203-remove-linked-list-elements
0432-all-oone-data-structure
0859-design-circular-deque
1484-linked-list-in-binary-tree
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Recursion

0024-swap-nodes-in-pairs
0044-wildcard-matching
0203-remove-linked-list-elements
0241-different-ways-to-add-parentheses
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string

Array

0040-combination-sum-ii
0053-maximum-subarray
0068-text-justification
0081-search-in-rotated-sorted-array-ii
0128-longest-consecutive-sequence
0153-find-minimum-in-rotated-sorted-array
0154-find-minimum-in-rotated-sorted-array-ii
0162-find-peak-element
0179-largest-number
0212-word-search-ii
0216-combination-sum-iii
0228-summary-ranges
0329-longest-increasing-path-in-a-matrix
0494-target-sum
0524-longest-word-in-dictionary-through-deleting
0539-minimum-time-difference
0624-maximum-distance-in-arrays
0658-find-k-closest-elements
0859-design-circular-deque
0890-lemonade-change
0906-walking-robot-simulation
1002-maximum-width-ramp
1063-best-sightseeing-pair
1256-rank-transform-of-an-array
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1497-design-a-stack-with-increment-operation
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1786-count-the-number-of-consistent-strings
1923-sentence-similarity-iii
1972-rotating-the-box
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2054-the-number-of-the-smallest-unoccupied-chair
2067-maximum-number-of-points-with-cost
2089-maximum-matrix-sum
2104-operations-on-tree
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2170-count-number-of-maximum-bitwise-or-subsets
2356-largest-combination-with-bitwise-and-greater-than-zero
2411-spiral-matrix-iv
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2503-longest-subarray-with-maximum-bitwise-and
2581-divide-players-into-teams-of-equal-skill
2616-maximal-score-after-applying-k-operations
2727-number-of-senior-citizens
2881-split-strings-by-separator
2884-length-of-the-longest-valid-substring
3291-find-if-array-can-be-sorted
3329-find-the-length-of-the-longest-common-prefix
3501-delete-nodes-from-linked-list-present-in-array

Sorting

0179-largest-number
0524-longest-word-in-dictionary-through-deleting
0539-minimum-time-difference
0658-find-k-closest-elements
1256-rank-transform-of-an-array
1333-sort-the-jumbled-numbers
1468-check-if-n-and-its-double-exist
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill
2646-kth-largest-sum-in-a-binary-tree
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted

Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0222-count-complete-tree-nodes
0337-house-robber-iii
0508-most-frequent-subtree-sum
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0617-merge-two-binary-trees
0655-print-binary-tree
0671-second-minimum-node-in-a-binary-tree
0687-longest-univalue-path
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1484-linked-list-in-binary-tree
2104-operations-on-tree
2646-kth-largest-sum-in-a-binary-tree

Depth-First Search

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0145-binary-tree-postorder-traversal
0211-design-add-and-search-words-data-structure
0329-longest-increasing-path-in-a-matrix
0337-house-robber-iii
0386-lexicographical-numbers
0508-most-frequent-subtree-sum
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0617-merge-two-binary-trees
0655-print-binary-tree
0671-second-minimum-node-in-a-binary-tree
0687-longest-univalue-path
0776-n-ary-tree-postorder-traversal
0984-most-stones-removed-with-same-row-or-column
1484-linked-list-in-binary-tree
2035-count-sub-islands
2104-operations-on-tree

Binary Search Tree

0081-search-in-rotated-sorted-array-ii
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0153-find-minimum-in-rotated-sorted-array
0154-find-minimum-in-rotated-sorted-array-ii
0162-find-peak-element
0173-binary-search-tree-iterator
0222-count-complete-tree-nodes
0538-convert-bst-to-greater-tree
0658-find-k-closest-elements
0789-kth-largest-element-in-a-stream
1468-check-if-n-and-its-double-exist
1615-range-sum-of-sorted-subarray-sums
2006-find-the-student-that-will-replace-the-chalk

Binary Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0222-count-complete-tree-nodes
0337-house-robber-iii
0508-most-frequent-subtree-sum
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0617-merge-two-binary-trees
0655-print-binary-tree
0671-second-minimum-node-in-a-binary-tree
0687-longest-univalue-path
0789-kth-largest-element-in-a-stream
1484-linked-list-in-binary-tree
2646-kth-largest-sum-in-a-binary-tree

Hash Table

0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0142-linked-list-cycle-ii
0146-lru-cache
0187-repeated-dna-sequences
0264-ugly-number-ii
0432-all-oone-data-structure
0508-most-frequent-subtree-sum
0567-permutation-in-string
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0984-most-stones-removed-with-same-row-or-column
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1473-find-the-longest-substring-containing-vowels-in-even-counts
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1715-split-a-string-into-the-max-number-of-unique-substrings
1786-count-the-number-of-consistent-strings
2054-the-number-of-the-smallest-unoccupied-chair
2104-operations-on-tree
2356-largest-combination-with-bitwise-and-greater-than-zero
2581-divide-players-into-teams-of-equal-skill
2884-length-of-the-longest-valid-substring
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3501-delete-nodes-from-linked-list-present-in-array

Design

0146-lru-cache
0173-binary-search-tree-iterator
0211-design-add-and-search-words-data-structure
0432-all-oone-data-structure
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
1497-design-a-stack-with-increment-operation
2104-operations-on-tree

Doubly-Linked List

0146-lru-cache
0432-all-oone-data-structure

String

0043-multiply-strings
0044-wildcard-matching
0065-valid-number
0068-text-justification
0151-reverse-words-in-a-string
0179-largest-number
0187-repeated-dna-sequences
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0402-remove-k-digits
0443-string-compression
0524-longest-word-in-dictionary-through-deleting
0539-minimum-time-difference
0564-find-the-closest-palindrome
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0812-rotate-string
0920-uncommon-words-from-two-sentences
1197-parsing-a-boolean-expression
1304-longest-happy-string
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
1667-find-kth-bit-in-nth-binary-string
1715-split-a-string-into-the-max-number-of-unique-substrings
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1923-sentence-similarity-iii
2076-sum-of-digits-of-string-after-convert
2243-check-if-all-as-appears-before-all-bs
2494-sum-of-prefix-scores-of-strings
2580-circular-sentence
2727-number-of-senior-citizens
2800-minimum-string-length-after-removing-substrings
2881-split-strings-by-separator
2884-length-of-the-longest-valid-substring
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3451-string-compression-iii

Dynamic Programming

0044-wildcard-matching
0053-maximum-subarray
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0329-longest-increasing-path-in-a-matrix
0337-house-robber-iii
0494-target-sum
0650-2-keys-keyboard
1063-best-sightseeing-pair
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost

Stack

0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0402-remove-k-digits
0776-n-ary-tree-postorder-traversal
1002-maximum-width-ramp
1197-parsing-a-boolean-expression
1497-design-a-stack-with-increment-operation
1756-minimum-deletions-to-make-string-balanced
2800-minimum-string-length-after-removing-substrings

Two Pointers

0086-partition-list
0142-linked-list-cycle-ii
0151-reverse-words-in-a-string
0443-string-compression
0524-longest-word-in-dictionary-through-deleting
0567-permutation-in-string
0658-find-k-closest-elements
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1615-range-sum-of-sorted-subarray-sums
1923-sentence-similarity-iii
1972-rotating-the-box
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill

Divide and Conquer

0053-maximum-subarray

Breadth-First Search

0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0329-longest-increasing-path-in-a-matrix
0515-find-largest-value-in-each-tree-row
0617-merge-two-binary-trees
0655-print-binary-tree
1484-linked-list-in-binary-tree
2035-count-sub-islands
2104-operations-on-tree
2646-kth-largest-sum-in-a-binary-tree

Union Find

0128-longest-consecutive-sequence
0984-most-stones-removed-with-same-row-or-column
2035-count-sub-islands

Greedy

0044-wildcard-matching
0179-largest-number
0402-remove-k-digits
0624-maximum-distance-in-arrays
0670-maximum-swap
0890-lemonade-change
1304-longest-happy-string
2089-maximum-matrix-sum
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
3276-minimum-number-of-pushes-to-type-word-ii

Counting

0920-uncommon-words-from-two-sentences
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2356-largest-combination-with-bitwise-and-greater-than-zero
2494-sum-of-prefix-scores-of-strings
3276-minimum-number-of-pushes-to-type-word-ii

Heap (Priority Queue)

0264-ugly-number-ii
0658-find-k-closest-elements
0789-kth-largest-element-in-a-stream
1304-longest-happy-string
1325-path-with-maximum-probability
2054-the-number-of-the-smallest-unoccupied-chair
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations

Data Stream

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

Sliding Window

0187-repeated-dna-sequences
0567-permutation-in-string
0658-find-k-closest-elements
2884-length-of-the-longest-valid-substring

Backtracking

0040-combination-sum-ii
0212-word-search-ii
0216-combination-sum-iii
0494-target-sum
1715-split-a-string-into-the-max-number-of-unique-substrings
2170-count-number-of-maximum-bitwise-or-subsets

Math

0043-multiply-strings
0223-rectangle-area
0241-different-ways-to-add-parentheses
0263-ugly-number
0264-ugly-number-ii
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0670-maximum-swap
2155-find-missing-observations
2903-insert-greatest-common-divisors-in-linked-list

Monotonic Stack

0402-remove-k-digits
1002-maximum-width-ramp

Bit Manipulation

0187-repeated-dna-sequences
0222-count-complete-tree-nodes
0476-number-complement
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1786-count-the-number-of-consistent-strings
2170-count-number-of-maximum-bitwise-or-subsets
2323-minimum-bit-flips-to-convert-number
2356-largest-combination-with-bitwise-and-greater-than-zero
2503-longest-subarray-with-maximum-bitwise-and
3291-find-if-array-can-be-sorted
3394-minimum-array-end

Simulation

0043-multiply-strings
0068-text-justification
0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
1667-find-kth-bit-in-nth-binary-string
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2411-spiral-matrix-iv
2800-minimum-string-length-after-removing-substrings

Graph

0329-longest-increasing-path-in-a-matrix
0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability

Shortest Path

1325-path-with-maximum-probability

Matrix

0212-word-search-ii
0329-longest-increasing-path-in-a-matrix
1972-rotating-the-box
2035-count-sub-islands
2089-maximum-matrix-sum
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv

Trie

0211-design-add-and-search-words-data-structure
0212-word-search-ii
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
2494-sum-of-prefix-scores-of-strings
3329-find-the-length-of-the-longest-common-prefix

Prefix Sum

1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1694-make-sum-divisible-by-p
2006-find-the-student-that-will-replace-the-chalk
2488-divide-intervals-into-minimum-number-of-groups

Rolling Hash

0187-repeated-dna-sequences
0214-shortest-palindrome

String Matching

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

Hash Function

0187-repeated-dna-sequences
0214-shortest-palindrome

Number Theory

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

Iterator

0173-binary-search-tree-iterator

Geometry

0223-rectangle-area

Brainteaser

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

Memoization

0241-different-ways-to-add-parentheses
0329-longest-increasing-path-in-a-matrix

Queue

0859-design-circular-deque

Topological Sort

0329-longest-increasing-path-in-a-matrix

Enumeration

2170-count-number-of-maximum-bitwise-or-subsets

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published