Skip to content

MVARUNREDDY8203/LEETCODE_-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LEETCODE_-

Collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

Array

0121-best-time-to-buy-and-sell-stock
0130-surrounded-regions
0217-contains-duplicate
0540-single-element-in-a-sorted-array
0882-peak-index-in-a-mountain-array
0883-car-fleet
1056-capacity-to-ship-packages-within-d-days
1397-search-suggestions-system
2080-check-if-move-is-legal

Depth-First Search

0130-surrounded-regions
0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
1558-course-schedule-iv
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Breadth-First Search

0130-surrounded-regions
0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
1558-course-schedule-iv
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Union Find

0130-surrounded-regions

Matrix

0130-surrounded-regions
2080-check-if-move-is-legal

Graph

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
1558-course-schedule-iv
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
1558-course-schedule-iv

Enumeration

2080-check-if-move-is-legal

Binary Search

0540-single-element-in-a-sorted-array
0633-sum-of-square-numbers
0882-peak-index-in-a-mountain-array
1056-capacity-to-ship-packages-within-d-days
1397-search-suggestions-system

String

0020-valid-parentheses
0567-permutation-in-string
1397-search-suggestions-system

Trie

1397-search-suggestions-system

Sorting

0217-contains-duplicate
0883-car-fleet
1397-search-suggestions-system

Heap (Priority Queue)

1397-search-suggestions-system

Math

0633-sum-of-square-numbers

Two Pointers

0567-permutation-in-string
0633-sum-of-square-numbers

Hash Table

0217-contains-duplicate
0567-permutation-in-string

Dynamic Programming

0121-best-time-to-buy-and-sell-stock

Sliding Window

0567-permutation-in-string

Stack

0020-valid-parentheses
0155-min-stack
0883-car-fleet

Design

0155-min-stack

Monotonic Stack

0883-car-fleet

LeetCode Topics

Array

0018-4sum
0039-combination-sum
0040-combination-sum-ii
0041-first-missing-positive
0042-trapping-rain-water
0049-group-anagrams
0053-maximum-subarray
0084-largest-rectangle-in-histogram
0118-pascals-triangle
0120-triangle
0152-maximum-product-subarray
0198-house-robber
0221-maximal-square
0287-find-the-duplicate-number
0307-range-sum-query-mutable
0312-burst-balloons
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0472-concatenated-words
0474-ones-and-zeroes
0503-next-greater-element-ii
0539-minimum-time-difference
0560-subarray-sum-equals-k
0624-maximum-distance-in-arrays
0718-maximum-length-of-repeated-subarray
0719-find-k-th-smallest-pair-distance
0721-accounts-merge
0729-my-calendar-i
0731-my-calendar-ii
0740-delete-and-earn
0859-design-circular-deque
0890-lemonade-change
0906-walking-robot-simulation
0921-spiral-matrix-iii
0971-shortest-bridge
0999-regions-cut-by-slashes
1025-minimum-cost-for-tickets
1056-capacity-to-ship-packages-within-d-days
1130-last-stone-weight-ii
1145-number-of-submatrices-that-sum-to-target
1171-shortest-path-in-binary-matrix
1231-replace-elements-with-greatest-element-on-right-side
1240-stone-game-ii
1325-path-with-maximum-probability
1393-maximum-value-of-k-coins-from-piles
1435-xor-queries-of-a-subarray
1463-the-k-weakest-rows-in-a-matrix
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
1691-minimum-number-of-days-to-disconnect-island
1706-min-cost-to-connect-all-points
1753-path-with-minimum-effort
1766-minimum-number-of-removals-to-make-mountain-array
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1923-sentence-similarity-iii
2006-find-the-student-that-will-replace-the-chalk
2054-the-number-of-the-smallest-unoccupied-chair
2058-concatenation-of-array
2067-maximum-number-of-points-with-cost
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2179-most-beautiful-item-for-each-query
2255-minimum-swaps-to-group-all-1s-together-ii
2294-minimum-time-to-complete-trips
2392-successful-pairs-of-spells-and-potions
2411-spiral-matrix-iv
2443-check-if-there-is-a-valid-partition-for-the-array
2503-longest-subarray-with-maximum-bitwise-and
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2616-maximal-score-after-applying-k-operations
2641-disconnect-path-in-a-binary-matrix-by-at-most-one-flip
2716-prime-subtraction-operation
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
3106-length-of-the-longest-subsequence-that-sums-to-target
3463-alternating-groups-i

Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0143-reorder-list
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0402-remove-k-digits
0503-next-greater-element-ii
0678-valid-parenthesis-string
0776-n-ary-tree-postorder-traversal
0957-minimum-add-to-make-parentheses-valid
1497-design-a-stack-with-increment-operation

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0402-remove-k-digits
0503-next-greater-element-ii

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0025-reverse-nodes-in-k-group
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0432-all-oone-data-structure
0725-split-linked-list-in-parts
0766-flatten-a-multilevel-doubly-linked-list
0859-design-circular-deque
1484-linked-list-in-binary-tree
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list

Two Pointers

0018-4sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0287-find-the-duplicate-number
0392-is-subsequence
0647-palindromic-substrings
0719-find-k-th-smallest-pair-distance
1615-range-sum-of-sorted-subarray-sums
1923-sentence-similarity-iii
2392-successful-pairs-of-spells-and-potions
3195-separate-black-and-white-balls

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0025-reverse-nodes-in-k-group
0143-reorder-list
0234-palindrome-linked-list
0273-integer-to-english-words

Hash Table

0041-first-missing-positive
0049-group-anagrams
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0187-repeated-dna-sequences
0208-implement-trie-prefix-tree
0264-ugly-number-ii
0432-all-oone-data-structure
0560-subarray-sum-equals-k
0652-find-duplicate-subtrees
0676-implement-magic-dictionary
0721-accounts-merge
0740-delete-and-earn
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1145-number-of-submatrices-that-sum-to-target
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2054-the-number-of-the-smallest-unoccupied-chair
2163-kth-distinct-string-in-an-array
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
3276-minimum-number-of-pushes-to-type-word-ii

String

0010-regular-expression-matching
0049-group-anagrams
0058-length-of-last-word
0187-repeated-dna-sequences
0208-implement-trie-prefix-tree
0273-integer-to-english-words
0297-serialize-and-deserialize-binary-tree
0392-is-subsequence
0402-remove-k-digits
0472-concatenated-words
0474-ones-and-zeroes
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0647-palindromic-substrings
0664-strange-printer
0676-implement-magic-dictionary
0678-valid-parenthesis-string
0721-accounts-merge
0812-rotate-string
0920-uncommon-words-from-two-sentences
0957-minimum-add-to-make-parentheses-valid
1250-longest-common-subsequence
1302-delete-characters-to-make-fancy-string
1786-count-the-number-of-consistent-strings
1804-maximum-binary-string-after-change
1923-sentence-similarity-iii
2076-sum-of-digits-of-string-after-convert
2163-kth-distinct-string-in-an-array
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii

Sorting

0018-4sum
0049-group-anagrams
0539-minimum-time-difference
0719-find-k-th-smallest-pair-distance
0721-accounts-merge
1463-the-k-weakest-rows-in-a-matrix
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
2179-most-beautiful-item-for-each-query
2392-successful-pairs-of-spells-and-potions
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
3276-minimum-number-of-pushes-to-type-word-ii

Math

0002-add-two-numbers
0264-ugly-number-ii
0273-integer-to-english-words
0279-perfect-squares
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0956-number-of-music-playlists
1240-stone-game-ii
1996-number-of-ways-to-rearrange-sticks-with-k-sticks-visible
2155-find-missing-observations
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list

Binary Search

0287-find-the-duplicate-number
0410-split-array-largest-sum
0718-maximum-length-of-repeated-subarray
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
1056-capacity-to-ship-packages-within-d-days
1463-the-k-weakest-rows-in-a-matrix
1615-range-sum-of-sorted-subarray-sums
1753-path-with-minimum-effort
1766-minimum-number-of-removals-to-make-mountain-array
2006-find-the-student-that-will-replace-the-chalk
2179-most-beautiful-item-for-each-query
2294-minimum-time-to-complete-trips
2392-successful-pairs-of-spells-and-potions
2586-longest-square-streak-in-an-array
2716-prime-subtraction-operation

Bit Manipulation

0187-repeated-dna-sequences
0287-find-the-duplicate-number
0476-number-complement
1435-xor-queries-of-a-subarray
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and

Simulation

0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
1803-average-waiting-time
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
2155-find-missing-observations
2411-spiral-matrix-iv

Greedy

0402-remove-k-digits
0410-split-array-largest-sum
0624-maximum-distance-in-arrays
0678-valid-parenthesis-string
0890-lemonade-change
0957-minimum-add-to-make-parentheses-valid
1766-minimum-number-of-removals-to-make-mountain-array
1804-maximum-binary-string-after-change
2616-maximal-score-after-applying-k-operations
2716-prime-subtraction-operation
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii

Dynamic Programming

0010-regular-expression-matching
0042-trapping-rain-water
0053-maximum-subarray
0118-pascals-triangle
0120-triangle
0152-maximum-product-subarray
0198-house-robber
0221-maximal-square
0264-ugly-number-ii
0279-perfect-squares
0312-burst-balloons
0337-house-robber-iii
0392-is-subsequence
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0472-concatenated-words
0474-ones-and-zeroes
0647-palindromic-substrings
0650-2-keys-keyboard
0664-strange-printer
0678-valid-parenthesis-string
0718-maximum-length-of-repeated-subarray
0740-delete-and-earn
0956-number-of-music-playlists
1008-binary-tree-cameras
1025-minimum-cost-for-tickets
1130-last-stone-weight-ii
1240-stone-game-ii
1250-longest-common-subsequence
1393-maximum-value-of-k-coins-from-piles
1676-minimum-number-of-days-to-eat-n-oranges
1766-minimum-number-of-removals-to-make-mountain-array
1996-number-of-ways-to-rearrange-sticks-with-k-sticks-visible
2067-maximum-number-of-points-with-cost
2443-check-if-there-is-a-valid-partition-for-the-array
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2641-disconnect-path-in-a-binary-matrix-by-at-most-one-flip
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
3106-length-of-the-longest-subsequence-that-sums-to-target

Prefix Sum

0410-split-array-largest-sum
0560-subarray-sum-equals-k
0731-my-calendar-ii
1145-number-of-submatrices-that-sum-to-target
1240-stone-game-ii
1393-maximum-value-of-k-coins-from-piles
1435-xor-queries-of-a-subarray
2006-find-the-student-that-will-replace-the-chalk

Depth-First Search

0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0386-lexicographical-numbers
0472-concatenated-words
0652-find-duplicate-subtrees
0676-implement-magic-dictionary
0684-redundant-connection
0721-accounts-merge
0744-network-delay-time
0766-flatten-a-multilevel-doubly-linked-list
0776-n-ary-tree-postorder-traversal
0971-shortest-bridge
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1008-binary-tree-cameras
1300-critical-connections-in-a-network
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
1753-path-with-minimum-effort
2438-find-closest-node-to-given-two-nodes
2641-disconnect-path-in-a-binary-matrix-by-at-most-one-flip

Doubly-Linked List

0432-all-oone-data-structure
0766-flatten-a-multilevel-doubly-linked-list

Divide and Conquer

0053-maximum-subarray

Tree

0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0652-find-duplicate-subtrees
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1008-binary-tree-cameras
1484-linked-list-in-binary-tree

Binary Tree

0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0652-find-duplicate-subtrees
0789-kth-largest-element-in-a-stream
1008-binary-tree-cameras
1484-linked-list-in-binary-tree

Breadth-First Search

0199-binary-tree-right-side-view
0279-perfect-squares
0297-serialize-and-deserialize-binary-tree
0684-redundant-connection
0721-accounts-merge
0744-network-delay-time
0971-shortest-bridge
0999-regions-cut-by-slashes
1171-shortest-path-in-binary-matrix
1229-shortest-path-with-alternating-colors
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
1753-path-with-minimum-effort
2641-disconnect-path-in-a-binary-matrix-by-at-most-one-flip

Design

0208-implement-trie-prefix-tree
0297-serialize-and-deserialize-binary-tree
0307-range-sum-query-mutable
0432-all-oone-data-structure
0676-implement-magic-dictionary
0729-my-calendar-i
0731-my-calendar-ii
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
1497-design-a-stack-with-increment-operation

Database

0197-rising-temperature
0584-find-customer-referee
0595-big-countries
1509-replace-employee-id-with-the-unique-identifier
1724-customer-who-visited-but-did-not-make-any-transactions

Segment Tree

0307-range-sum-query-mutable
0729-my-calendar-i
0731-my-calendar-ii

Ordered Set

0729-my-calendar-i
0731-my-calendar-ii

Matrix

0221-maximal-square
0921-spiral-matrix-iii
0971-shortest-bridge
0999-regions-cut-by-slashes
1145-number-of-submatrices-that-sum-to-target
1171-shortest-path-in-binary-matrix
1463-the-k-weakest-rows-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1753-path-with-minimum-effort
2067-maximum-number-of-points-with-cost
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv
2641-disconnect-path-in-a-binary-matrix-by-at-most-one-flip
2794-maximum-number-of-moves-in-a-grid

Backtracking

0039-combination-sum
0040-combination-sum-ii

Combinatorics

0956-number-of-music-playlists
1996-number-of-ways-to-rearrange-sticks-with-k-sticks-visible

Trie

0208-implement-trie-prefix-tree
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
0472-concatenated-words
0676-implement-magic-dictionary
2755-extra-characters-in-a-string

Union Find

0684-redundant-connection
0721-accounts-merge
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1706-min-cost-to-connect-all-points
1753-path-with-minimum-effort

Heap (Priority Queue)

0264-ugly-number-ii
0744-network-delay-time
0789-kth-largest-element-in-a-stream
1325-path-with-maximum-probability
1463-the-k-weakest-rows-in-a-matrix
1753-path-with-minimum-effort
2054-the-number-of-the-smallest-unoccupied-chair
2616-maximal-score-after-applying-k-operations

Graph

0684-redundant-connection
0744-network-delay-time
0984-most-stones-removed-with-same-row-or-column
1229-shortest-path-with-alternating-colors
1300-critical-connections-in-a-network
1325-path-with-maximum-probability
1706-min-cost-to-connect-all-points
2438-find-closest-node-to-given-two-nodes

Minimum Spanning Tree

1706-min-cost-to-connect-all-points

Shortest Path

0744-network-delay-time
1325-path-with-maximum-probability

Memoization

1676-minimum-number-of-days-to-eat-n-oranges

Counting

0920-uncommon-words-from-two-sentences
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
3276-minimum-number-of-pushes-to-type-word-ii

Binary Search Tree

0230-kth-smallest-element-in-a-bst
0789-kth-largest-element-in-a-stream

Data Stream

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

Sliding Window

0187-repeated-dna-sequences
0718-maximum-length-of-repeated-subarray
2255-minimum-swaps-to-group-all-1s-together-ii
3463-alternating-groups-i

Strongly Connected Component

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

Biconnected Component

1300-critical-connections-in-a-network

Game Theory

1240-stone-game-ii

Rolling Hash

0187-repeated-dna-sequences
0718-maximum-length-of-repeated-subarray

Hash Function

0187-repeated-dna-sequences
0718-maximum-length-of-repeated-subarray

Binary Indexed Tree

0307-range-sum-query-mutable

Number Theory

2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list

Brainteaser

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

Queue

0859-design-circular-deque

String Matching

0812-rotate-string

About

A collection of my submissions on leetcode.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published