Skip to content

iamarghamallick/LeetCode-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

Auto-Updated with LeetHub

LeetCode Topics

Dynamic Programming

0010-regular-expression-matching
0118-pascals-triangle
0826-soup-servings
0867-new-21-game
0934-bitwise-ors-of-subarrays
1402-count-square-submatrices-with-all-ones
1586-longest-subarray-of-1s-after-deleting-one-element
1628-count-submatrices-with-all-ones
2028-the-earliest-and-latest-rounds-where-players-compete
2267-minimum-difference-in-sums-after-removal-of-elements
2882-ways-to-express-an-integer-as-sum-of-powers
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3648-find-the-maximum-number-of-fruits-collected
3733-length-of-longest-v-shaped-diagonal-segment

Memoization

2028-the-earliest-and-latest-rounds-where-players-compete
3733-length-of-longest-v-shaped-diagonal-segment

Array

0036-valid-sudoku
0037-sudoku-solver
0047-permutations-ii
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0498-diagonal-traverse
0679-24-game
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
1350-remove-sub-folders-from-the-filesystem
1402-count-square-submatrices-with-all-ones
1586-longest-subarray-of-1s-after-deleting-one-element
1628-count-submatrices-with-all-ones
1813-maximum-erasure-value
1917-maximum-average-pass-ratio
2079-delete-duplicate-folders-in-system
2170-count-number-of-maximum-bitwise-or-subsets
2229-maximum-fruits-harvested-after-at-most-k-steps
2267-minimum-difference-in-sums-after-removal-of-elements
2316-count-hills-and-valleys-in-an-array
2400-minimum-score-after-removals-on-a-tree
2432-number-of-zero-filled-subarrays
2497-maximum-matching-of-players-with-trainers
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2529-range-product-queries-of-powers
2689-rearranging-fruits
3251-maximum-area-of-longest-diagonal-rectangle
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3648-find-the-maximum-number-of-fruits-collected
3733-length-of-longest-v-shaped-diagonal-segment
3744-minimum-operations-to-make-array-elements-zero
3748-sort-matrix-by-diagonals
3788-maximum-unique-subarray-sum-after-deletion
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Two Pointers

0125-valid-palindrome
0160-intersection-of-two-linked-lists
0344-reverse-string
2497-maximum-matching-of-players-with-trainers

Greedy

0316-remove-duplicate-letters
1448-maximum-69-number
1818-maximum-score-from-removing-substrings
1917-maximum-average-pass-ratio
2497-maximum-matching-of-players-with-trainers
2689-rearranging-fruits
3788-maximum-unique-subarray-sum-after-deletion

Sorting

0047-permutations-ii
0900-reordered-power-of-2
2497-maximum-matching-of-players-with-trainers
2689-rearranging-fruits
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3748-sort-matrix-by-diagonals

String

0006-zigzag-conversion
0008-string-to-integer-atoi
0010-regular-expression-matching
0012-integer-to-roman
0125-valid-palindrome
0168-excel-sheet-column-title
0171-excel-sheet-column-number
0316-remove-duplicate-letters
0344-reverse-string
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1818-maximum-score-from-removing-substrings
2079-delete-duplicate-folders-in-system
2346-largest-3-same-digit-number-in-string
3396-valid-word

Recursion

0010-regular-expression-matching
0206-reverse-linked-list
0231-power-of-two
0326-power-of-three
0342-power-of-four

Linked List

0160-intersection-of-two-linked-lists
0206-reverse-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Math

0012-integer-to-roman
0168-excel-sheet-column-title
0171-excel-sheet-column-number
0231-power-of-two
0326-power-of-three
0342-power-of-four
0679-24-game
0826-soup-servings
0867-new-21-game
0900-reordered-power-of-2
1048-clumsy-factorial
1411-convert-binary-number-in-a-linked-list-to-integer
1448-maximum-69-number
2432-number-of-zero-filled-subarrays
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3279-alice-and-bob-playing-flower-game
3744-minimum-operations-to-make-array-elements-zero
3830-find-closest-person

Heap (Priority Queue)

1917-maximum-average-pass-ratio
2267-minimum-difference-in-sums-after-removal-of-elements

Depth-First Search

0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
1350-remove-sub-folders-from-the-filesystem
2400-minimum-score-after-removals-on-a-tree

Trie

1350-remove-sub-folders-from-the-filesystem
2079-delete-duplicate-folders-in-system

Hash Table

0012-integer-to-roman
0036-valid-sudoku
0037-sudoku-solver
0160-intersection-of-two-linked-lists
0900-reordered-power-of-2
0940-fruit-into-baskets
1813-maximum-erasure-value
2079-delete-duplicate-folders-in-system
2689-rearranging-fruits
3788-maximum-unique-subarray-sum-after-deletion

Hash Function

2079-delete-duplicate-folders-in-system

Sliding Window

0867-new-21-game
0940-fruit-into-baskets
1586-longest-subarray-of-1s-after-deleting-one-element
1813-maximum-erasure-value
2229-maximum-fruits-harvested-after-at-most-k-steps
2498-smallest-subarrays-with-maximum-bitwise-or

Stack

0144-binary-tree-preorder-traversal
0316-remove-duplicate-letters
1048-clumsy-factorial
1628-count-submatrices-with-all-ones
1818-maximum-score-from-removing-substrings

Bit Manipulation

0190-reverse-bits
0231-power-of-two
0342-power-of-four
0934-bitwise-ors-of-subarrays
2170-count-number-of-maximum-bitwise-or-subsets
2400-minimum-score-after-removals-on-a-tree
2498-smallest-subarrays-with-maximum-bitwise-or
2503-longest-subarray-with-maximum-bitwise-and
2529-range-product-queries-of-powers
2837-minimum-operations-to-make-the-integer-zero
3744-minimum-operations-to-make-array-elements-zero

Tree

0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal
2400-minimum-score-after-removals-on-a-tree

Segment Tree

3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Enumeration

0900-reordered-power-of-2
2170-count-number-of-maximum-bitwise-or-subsets
2837-minimum-operations-to-make-the-integer-zero
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3459-find-the-minimum-area-to-cover-all-ones-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Prefix Sum

2229-maximum-fruits-harvested-after-at-most-k-steps
2529-range-product-queries-of-powers
3789-maximize-subarrays-after-removing-one-conflicting-pair

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree
0190-reverse-bits

Binary Search Tree

0108-convert-sorted-array-to-binary-search-tree
2229-maximum-fruits-harvested-after-at-most-k-steps
2498-smallest-subarrays-with-maximum-bitwise-or
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Binary Tree

0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0144-binary-tree-preorder-traversal

Breadth-First Search

0111-minimum-depth-of-binary-tree
0112-path-sum

Backtracking

0037-sudoku-solver
0047-permutations-ii
0679-24-game
2170-count-number-of-maximum-bitwise-or-subsets

Database

0175-combine-two-tables
0176-second-highest-salary
0177-nth-highest-salary
0181-employees-earning-more-than-their-managers
0182-duplicate-emails
0183-customers-who-never-order
0184-department-highest-salary
0196-delete-duplicate-emails
0197-rising-temperature
0570-managers-with-at-least-5-direct-reports
0577-employee-bonus
0584-find-customer-referee
0595-big-countries
1153-product-sales-analysis-i
1258-article-views-i
1415-students-and-examinations
1509-replace-employee-id-with-the-unique-identifier
1724-customer-who-visited-but-did-not-make-any-transactions
1801-average-time-of-process-per-machine
1827-invalid-tweets
1908-recyclable-and-low-fat-products
2087-confirmation-rate

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and
2837-minimum-operations-to-make-the-integer-zero

Simulation

0498-diagonal-traverse
1048-clumsy-factorial
3790-fruits-into-baskets-ii

Ordered Set

3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Matrix

0036-valid-sudoku
0037-sudoku-solver
0498-diagonal-traverse
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3648-find-the-maximum-number-of-fruits-collected
3733-length-of-longest-v-shaped-diagonal-segment
3748-sort-matrix-by-diagonals

Probability and Statistics

0826-soup-servings
0867-new-21-game

Counting

0900-reordered-power-of-2

Monotonic Stack

0316-remove-duplicate-letters
1628-count-submatrices-with-all-ones

Geometry

3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i