Skip to content

99likhitha/Leetcode_solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode_solutions

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

LeetCode Topics

Math

0166-fraction-to-recurring-decimal
0326-power-of-three
0342-power-of-four
0679-24-game
0830-largest-triangle-area
0867-new-21-game
1018-largest-perimeter-triangle
1426-find-n-unique-integers-sum-up-to-zero
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1448-maximum-69-number
1642-water-bottles
2307-replace-non-coprime-numbers-in-array
2324-find-triangular-sum-of-an-array
2432-number-of-zero-filled-subarrays
2661-smallest-missing-non-negative-integer-after-operations
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
3336-water-bottles-ii
3462-vowels-game-in-a-string
3744-minimum-operations-to-make-array-elements-zero
3830-find-closest-person
3851-find-sum-of-array-product-of-magical-sequences

Recursion

0326-power-of-three
0342-power-of-four

Array

0011-container-with-most-water
0036-valid-sudoku
0037-sudoku-solver
0120-triangle
0130-surrounded-regions
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0498-diagonal-traverse
0542-01-matrix
0611-valid-triangle-number
0679-24-game
0721-accounts-merge
0733-flood-fill
0794-swim-in-rising-water
0830-largest-triangle-area
0854-making-a-large-island
1006-vowel-spellchecker
1018-largest-perimeter-triangle
1036-rotting-oranges
1050-construct-binary-search-tree-from-preorder-traversal
1073-number-of-enclaves
1111-minimum-score-triangulation-of-polygon
1171-shortest-path-in-binary-matrix
1353-find-resultant-array-after-removing-anagrams
1402-count-square-submatrices-with-all-ones
1426-find-n-unique-integers-sum-up-to-zero
1586-longest-subarray-of-1s-after-deleting-one-element
1612-avoid-flood-in-the-city
1628-count-submatrices-with-all-ones
1753-path-with-minimum-effort
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
2023-design-movie-rental-system
2307-replace-non-coprime-numbers-in-array
2324-find-triangular-sum-of-an-array
2392-successful-pairs-of-spells-and-potions
2429-design-a-food-rating-system
2432-number-of-zero-filled-subarrays
2529-range-product-queries-of-powers
2661-smallest-missing-non-negative-integer-after-operations
3242-count-elements-with-maximum-frequency
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
3383-taking-maximum-energy-from-the-mystic-dungeon
3437-maximum-total-damage-with-spell-casting
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3619-adjacent-increasing-subarrays-detection-ii
3733-length-of-longest-v-shaped-diagonal-segment
3744-minimum-operations-to-make-array-elements-zero
3748-sort-matrix-by-diagonals
3794-find-the-minimum-amount-of-time-to-brew-potions
3797-design-spreadsheet
3827-implement-router
3851-find-sum-of-array-product-of-magical-sequences

Bit Manipulation

0342-power-of-four
2529-range-product-queries-of-powers
2837-minimum-operations-to-make-the-integer-zero
3744-minimum-operations-to-make-array-elements-zero
3851-find-sum-of-array-product-of-magical-sequences

Prefix Sum

2529-range-product-queries-of-powers
3383-taking-maximum-energy-from-the-mystic-dungeon
3794-find-the-minimum-amount-of-time-to-brew-potions

String

0127-word-ladder
0165-compare-version-numbers
0166-fraction-to-recurring-decimal
0721-accounts-merge
1006-vowel-spellchecker
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
2346-largest-3-same-digit-number-in-string
2429-design-a-food-rating-system
2887-sort-vowels-in-a-string
3462-vowels-game-in-a-string
3797-design-spreadsheet
3872-find-most-frequent-vowel-and-consonant

Greedy

0011-container-with-most-water
0611-valid-triangle-number
1018-largest-perimeter-triangle
1448-maximum-69-number
1612-avoid-flood-in-the-city
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
2661-smallest-missing-non-negative-integer-after-operations

Dynamic Programming

0120-triangle
0542-01-matrix
0803-cheapest-flights-within-k-stops
0867-new-21-game
1111-minimum-score-triangulation-of-polygon
1402-count-square-submatrices-with-all-ones
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1586-longest-subarray-of-1s-after-deleting-one-element
1628-count-submatrices-with-all-ones
2090-number-of-ways-to-arrive-at-destination
2408-number-of-people-aware-of-a-secret
2882-ways-to-express-an-integer-as-sum-of-powers
3437-maximum-total-damage-with-spell-casting
3733-length-of-longest-v-shaped-diagonal-segment
3851-find-sum-of-array-product-of-magical-sequences

Sliding Window

0867-new-21-game
1586-longest-subarray-of-1s-after-deleting-one-element

Probability and Statistics

0867-new-21-game

Backtracking

0037-sudoku-solver
0679-24-game

Matrix

0036-valid-sudoku
0037-sudoku-solver
0130-surrounded-regions
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0498-diagonal-traverse
0542-01-matrix
0733-flood-fill
0794-swim-in-rising-water
0854-making-a-large-island
1036-rotting-oranges
1073-number-of-enclaves
1171-shortest-path-in-binary-matrix
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones
1753-path-with-minimum-effort
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3733-length-of-longest-v-shaped-diagonal-segment
3748-sort-matrix-by-diagonals
3797-design-spreadsheet

Stack

0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
1050-construct-binary-search-tree-from-preorder-traversal
1628-count-submatrices-with-all-ones
2307-replace-non-coprime-numbers-in-array

Monotonic Stack

1050-construct-binary-search-tree-from-preorder-traversal
1628-count-submatrices-with-all-ones

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0130-surrounded-regions
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0207-course-schedule
0210-course-schedule-ii
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0417-pacific-atlantic-water-flow
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0721-accounts-merge
0733-flood-fill
0744-network-delay-time
0794-swim-in-rising-water
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0854-making-a-large-island
1073-number-of-enclaves
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort

Breadth-First Search

0102-binary-tree-level-order-traversal
0127-word-ladder
0130-surrounded-regions
0207-course-schedule
0210-course-schedule-ii
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0542-01-matrix
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0721-accounts-merge
0733-flood-fill
0744-network-delay-time
0794-swim-in-rising-water
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0854-making-a-large-island
1036-rotting-oranges
1073-number-of-enclaves
1171-shortest-path-in-binary-matrix
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort

Union Find

0130-surrounded-regions
0547-number-of-provinces
0721-accounts-merge
0794-swim-in-rising-water
0801-is-graph-bipartite
0854-making-a-large-island
1073-number-of-enclaves
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort

Graph

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
1442-number-of-operations-to-make-network-connected
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2090-number-of-ways-to-arrive-at-destination

Enumeration

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

Simulation

0498-diagonal-traverse
1642-water-bottles
2324-find-triangular-sum-of-an-array
2408-number-of-people-aware-of-a-secret
3336-water-bottles-ii
3794-find-the-minimum-amount-of-time-to-brew-potions

Sorting

0611-valid-triangle-number
0721-accounts-merge
1018-largest-perimeter-triangle
1353-find-resultant-array-after-removing-anagrams
2392-successful-pairs-of-spells-and-potions
2887-sort-vowels-in-a-string
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3437-maximum-total-damage-with-spell-casting
3748-sort-matrix-by-diagonals

Memoization

3733-length-of-longest-v-shaped-diagonal-segment

Hash Table

0036-valid-sudoku
0037-sudoku-solver
0127-word-ladder
0166-fraction-to-recurring-decimal
0653-two-sum-iv-input-is-a-bst
0721-accounts-merge
1006-vowel-spellchecker
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
1612-avoid-flood-in-the-city
1834-minimum-number-of-people-to-teach
2023-design-movie-rental-system
2429-design-a-food-rating-system
2661-smallest-missing-non-negative-integer-after-operations
3242-count-elements-with-maximum-frequency
3437-maximum-total-damage-with-spell-casting
3678-design-task-manager
3797-design-spreadsheet
3827-implement-router
3872-find-most-frequent-vowel-and-consonant

Heap (Priority Queue)

0407-trapping-rain-water-ii
0744-network-delay-time
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
1612-avoid-flood-in-the-city
1753-path-with-minimum-effort
1917-maximum-average-pass-ratio
2023-design-movie-rental-system
2429-design-a-food-rating-system
3678-design-task-manager

Geometry

0830-largest-triangle-area
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i

Brainteaser

2837-minimum-operations-to-make-the-integer-zero
3462-vowels-game-in-a-string

Queue

2408-number-of-people-aware-of-a-secret
3827-implement-router

Game Theory

3462-vowels-game-in-a-string

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
2090-number-of-ways-to-arrive-at-destination

Counting

3242-count-elements-with-maximum-frequency
3437-maximum-total-damage-with-spell-casting
3872-find-most-frequent-vowel-and-consonant

Number Theory

2307-replace-non-coprime-numbers-in-array

Design

2023-design-movie-rental-system
2429-design-a-food-rating-system
3678-design-task-manager
3797-design-spreadsheet
3827-implement-router

Ordered Set

2023-design-movie-rental-system
2429-design-a-food-rating-system
3678-design-task-manager
3827-implement-router

Binary Search

0611-valid-triangle-number
0794-swim-in-rising-water
1612-avoid-flood-in-the-city
1753-path-with-minimum-effort
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting
3619-adjacent-increasing-subarrays-detection-ii
3827-implement-router

Two Pointers

0011-container-with-most-water
0165-compare-version-numbers
0611-valid-triangle-number
0653-two-sum-iv-input-is-a-bst
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2090-number-of-ways-to-arrive-at-destination

Combinatorics

2324-find-triangular-sum-of-an-array
3851-find-sum-of-array-product-of-magical-sequences

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0102-binary-tree-level-order-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0784-insert-into-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal

Binary Search Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0784-insert-into-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0102-binary-tree-level-order-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0784-insert-into-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal

Bitmask

3851-find-sum-of-array-product-of-magical-sequences

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages