Skip to content

Shresta-Voruganti/leetcodee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Badges

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0016-3sum-closest
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0051-n-queens
0053-maximum-subarray
0066-plus-one
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0090-subsets-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0136-single-number
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0217-contains-duplicate
0219-contains-duplicate-ii
0238-product-of-array-except-self
0240-search-a-2d-matrix-ii
0283-move-zeroes
0300-longest-increasing-subsequence
0347-top-k-frequent-elements
0436-find-right-interval
0496-next-greater-element-i
0500-keyboard-row
0503-next-greater-element-ii
0542-01-matrix
0560-subarray-sum-equals-k
0605-can-place-flowers
0695-max-area-of-island
0745-find-smallest-letter-greater-than-target
0792-binary-search
0906-walking-robot-simulation
0907-koko-eating-bananas
0917-boats-to-save-people
0940-fruit-into-baskets
1002-maximum-width-ramp
1019-squares-of-a-sorted-array
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
1256-rank-transform-of-an-array
1331-path-with-maximum-gold
1364-tuple-with-same-product
1396-count-servers-that-communicate
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1524-string-matching-in-an-array
1528-kids-with-the-greatest-number-of-candies
1694-make-sum-divisible-by-p
1755-defuse-the-bomb
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
2006-find-the-student-that-will-replace-the-chalk
2132-convert-1d-array-into-2d-array
2292-counting-words-with-a-given-prefix
2358-number-of-ways-to-split-array
2448-count-number-of-bad-pairs
2465-shifting-letters-ii
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2685-first-completely-painted-row-or-column
2691-count-vowel-strings-in-ranges
2764-maximum-number-of-fish-in-a-grid
2766-find-the-prefix-common-array-of-two-arrays
3309-count-prefix-and-suffix-pairs-i
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3429-special-array-i

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0240-search-a-2d-matrix-ii
0278-first-bad-version
0300-longest-increasing-subsequence
0367-valid-perfect-square
0374-guess-number-higher-or-lower
0436-find-right-interval
0745-find-smallest-letter-greater-than-target
0792-binary-search
0907-koko-eating-bananas
1023-time-based-key-value-store
1468-check-if-n-and-its-double-exist
1476-count-negative-numbers-in-a-sorted-matrix
2006-find-the-student-that-will-replace-the-chalk
2134-maximize-the-confusion-of-an-exam

Simulation

0412-fizz-buzz
0906-walking-robot-simulation
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Prefix Sum

0238-product-of-array-except-self
0560-subarray-sum-equals-k
1537-maximum-score-after-splitting-a-string
1694-make-sum-divisible-by-p
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2134-maximize-the-confusion-of-an-exam
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges

String

0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0079-word-search
0125-valid-palindrome
0151-reverse-words-in-a-string
0205-isomorphic-strings
0242-valid-anagram
0344-reverse-string
0345-reverse-vowels-of-a-string
0412-fizz-buzz
0500-keyboard-row
0800-letter-case-permutation
0812-rotate-string
0957-minimum-add-to-make-parentheses-valid
1023-time-based-key-value-store
1146-greatest-common-divisor-of-strings
1250-longest-common-subsequence
1302-delete-characters-to-make-fancy-string
1502-construct-k-palindrome-strings
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1894-merge-strings-alternately
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
1987-substrings-of-size-three-with-distinct-characters
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2095-minimum-number-of-swaps-to-make-the-string-balanced
2134-maximize-the-confusion-of-an-exam
2292-counting-words-with-a-given-prefix
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2465-shifting-letters-ii
2580-circular-sentence
2691-count-vowel-strings-in-ranges
2800-minimum-string-length-after-removing-substrings
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3309-count-prefix-and-suffix-pairs-i
3447-clear-digits
3451-string-compression-iii
3455-minimum-length-of-string-after-operations

Matrix

0074-search-a-2d-matrix
0079-word-search
0240-search-a-2d-matrix-ii
0542-01-matrix
0695-max-area-of-island
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
1331-path-with-maximum-gold
1396-count-servers-that-communicate
1476-count-negative-numbers-in-a-sorted-matrix
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1876-map-of-highest-peak
2132-convert-1d-array-into-2d-array
2685-first-completely-painted-row-or-column
2764-maximum-number-of-fish-in-a-grid

Hash Table

0001-two-sum
0017-letter-combinations-of-a-phone-number
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0347-top-k-frequent-elements
0496-next-greater-element-i
0500-keyboard-row
0560-subarray-sum-equals-k
0906-walking-robot-simulation
0940-fruit-into-baskets
1023-time-based-key-value-store
1256-rank-transform-of-an-array
1364-tuple-with-same-product
1468-check-if-n-and-its-double-exist
1502-construct-k-palindrome-strings
1694-make-sum-divisible-by-p
1915-check-if-one-string-swap-can-make-strings-equal
1987-substrings-of-size-three-with-distinct-characters
2059-unique-length-3-palindromic-subsequences
2448-count-number-of-bad-pairs
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2685-first-completely-painted-row-or-column
2766-find-the-prefix-common-array-of-two-arrays
3455-minimum-length-of-string-after-operations

Database

0176-second-highest-salary
0180-consecutive-numbers
0185-department-top-three-salaries
0196-delete-duplicate-emails
0197-rising-temperature
0570-managers-with-at-least-5-direct-reports
0577-employee-bonus
0584-find-customer-referee
0585-investments-in-2016
0595-big-countries
0596-classes-more-than-5-students
0602-friend-requests-ii-who-has-the-most-friends
0610-triangle-judgement
0619-biggest-single-number
0620-not-boring-movies
0626-exchange-seats
1135-customers-who-bought-all-products
1153-product-sales-analysis-i
1155-product-sales-analysis-iii
1161-project-employees-i
1182-game-play-analysis-iv
1245-user-activity-for-the-past-30-days-i
1258-article-views-i
1278-product-price-at-a-given-date
1292-immediate-food-delivery-ii
1317-monthly-transactions-i
1327-last-person-to-fit-in-the-bus
1338-queries-quality-and-percentage
1390-average-selling-price
1415-students-and-examinations
1452-restaurant-growth
1462-list-the-products-ordered-in-a-period
1480-movie-rating
1509-replace-employee-id-with-the-unique-identifier
1625-group-sold-products-by-the-date
1664-find-users-with-valid-e-mails
1670-patients-with-a-condition
1724-customer-who-visited-but-did-not-make-any-transactions
1773-percentage-of-users-attended-a-contest
1801-average-time-of-process-per-machine
1811-fix-names-in-a-table
1827-invalid-tweets
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1908-recyclable-and-low-fat-products
1942-primary-department-for-each-employee
2057-count-salary-categories
2087-confirmation-rate
2127-employees-whose-manager-left-the-company
2495-number-of-unique-subjects-taught-by-each-teacher

Sorting

0016-3sum-closest
0075-sort-colors
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0436-find-right-interval
0917-boats-to-save-people
1019-squares-of-a-sorted-array
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
2581-divide-players-into-teams-of-equal-skill

Dynamic Programming

0053-maximum-subarray
0070-climbing-stairs
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0300-longest-increasing-subsequence
0338-counting-bits
0542-01-matrix
1013-fibonacci-number
1236-n-th-tribonacci-number
1250-longest-common-subsequence

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0169-majority-element
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements

Counting

0169-majority-element
0347-top-k-frequent-elements
1364-tuple-with-same-product
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1915-check-if-one-string-swap-can-make-strings-equal
1987-substrings-of-size-three-with-distinct-characters
2448-count-number-of-bad-pairs
3455-minimum-length-of-string-after-operations

Two Pointers

0016-3sum-closest
0075-sort-colors
0125-valid-palindrome
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0344-reverse-string
0345-reverse-vowels-of-a-string
0908-middle-of-the-linked-list
0917-boats-to-save-people
1019-squares-of-a-sorted-array
1468-check-if-n-and-its-double-exist
1894-merge-strings-alternately
2095-minimum-number-of-swaps-to-make-the-string-balanced
2581-divide-players-into-teams-of-equal-skill

Math

0007-reverse-integer
0009-palindrome-number
0050-powx-n
0066-plus-one
0069-sqrtx
0070-climbing-stairs
0089-gray-code
0189-rotate-array
0202-happy-number
0367-valid-perfect-square
0412-fizz-buzz
1013-fibonacci-number
1146-greatest-common-divisor-of-strings
1236-n-th-tribonacci-number
2448-count-number-of-bad-pairs

Recursion

0050-powx-n
0234-palindrome-linked-list
1013-fibonacci-number

Memoization

0070-climbing-stairs
1013-fibonacci-number
1236-n-th-tribonacci-number

Heap (Priority Queue)

0347-top-k-frequent-elements
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid

Bucket Sort

0347-top-k-frequent-elements

Quickselect

0347-top-k-frequent-elements

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0234-palindrome-linked-list
0496-next-greater-element-i
0503-next-greater-element-ii
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
2095-minimum-number-of-swaps-to-make-the-string-balanced
2800-minimum-string-length-after-removing-substrings
3447-clear-digits

Bit Manipulation

0078-subsets
0089-gray-code
0090-subsets-ii
0136-single-number
0338-counting-bits
0461-hamming-distance
0800-letter-case-permutation
0899-binary-gap
2059-unique-length-3-palindromic-subsequences
2766-find-the-prefix-common-array-of-two-arrays

Greedy

0122-best-time-to-buy-and-sell-stock-ii
0605-can-place-flowers
0917-boats-to-save-people
0957-minimum-add-to-make-parentheses-valid
1502-construct-k-palindrome-strings
2095-minimum-number-of-swaps-to-make-the-string-balanced

Trie

0014-longest-common-prefix
3309-count-prefix-and-suffix-pairs-i

String Matching

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

Monotonic Stack

0496-next-greater-element-i
0503-next-greater-element-ii
1002-maximum-width-ramp

Interactive

0278-first-bad-version
0374-guess-number-higher-or-lower

Tree

0094-binary-tree-inorder-traversal
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0515-find-largest-value-in-each-tree-row
0637-average-of-levels-in-binary-tree

Depth-First Search

0079-word-search
0094-binary-tree-inorder-traversal
0101-symmetric-tree
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0515-find-largest-value-in-each-tree-row
0547-number-of-provinces
0637-average-of-levels-in-binary-tree
0695-max-area-of-island
1396-count-servers-that-communicate
1558-course-schedule-iv
2764-maximum-number-of-fish-in-a-grid

Binary Tree

0094-binary-tree-inorder-traversal
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0110-balanced-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0515-find-largest-value-in-each-tree-row
0637-average-of-levels-in-binary-tree

Backtracking

0017-letter-combinations-of-a-phone-number
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0051-n-queens
0077-combinations
0078-subsets
0079-word-search
0089-gray-code
0090-subsets-ii
0800-letter-case-permutation
1331-path-with-maximum-gold

Breadth-First Search

0101-symmetric-tree
0102-binary-tree-level-order-traversal
0199-binary-tree-right-side-view
0515-find-largest-value-in-each-tree-row
0542-01-matrix
0547-number-of-provinces
0637-average-of-levels-in-binary-tree
0695-max-area-of-island
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
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
2764-maximum-number-of-fish-in-a-grid

Union Find

0547-number-of-provinces
0695-max-area-of-island
1396-count-servers-that-communicate
2764-maximum-number-of-fish-in-a-grid

Graph

0547-number-of-provinces
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv

Design

1023-time-based-key-value-store

Rolling Hash

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

Hash Function

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

Shortest Path

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

Topological Sort

1558-course-schedule-iv

Sliding Window

0219-contains-duplicate-ii
0940-fruit-into-baskets
1755-defuse-the-bomb
1987-substrings-of-size-three-with-distinct-characters
2134-maximize-the-confusion-of-an-exam
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2552-maximum-sum-of-distinct-subarrays-with-length-k

Linked List

0234-palindrome-linked-list
0908-middle-of-the-linked-list