Skip to content

Shrikrishnan/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leet-code

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

LeetCode Topics

String

0010-regular-expression-matching
0013-roman-to-integer
0014-longest-common-prefix
0038-count-and-say
0812-rotate-string
1006-vowel-spellchecker
1302-delete-characters-to-make-fancy-string
1353-find-resultant-array-after-removing-anagrams
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1786-count-the-number-of-consistent-strings
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
2429-design-a-food-rating-system
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges
2887-sort-vowels-in-a-string
3233-maximize-the-number-of-partitions-after-operations
3243-count-the-number-of-powerful-integers
3462-vowels-game-in-a-string

Trie

0014-longest-common-prefix

Array

0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0037-sudoku-solver
0088-merge-sorted-array
0368-largest-divisible-subset
0407-trapping-rain-water-ii
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0794-swim-in-rising-water
1006-vowel-spellchecker
1353-find-resultant-array-after-removing-anagrams
1426-find-n-unique-integers-sum-up-to-zero
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1524-string-matching-in-an-array
1612-avoid-flood-in-the-city
1656-count-good-triplets
1786-count-the-number-of-consistent-strings
1834-minimum-number-of-people-to-teach
1876-map-of-highest-peak
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1917-maximum-average-pass-ratio
1993-sum-of-all-subset-xor-totals
2145-grid-game
2262-solving-questions-with-brainpower
2277-count-equal-and-divisible-pairs-in-an-array
2280-count-good-triplets-in-an-array
2358-number-of-ways-to-split-array
2392-successful-pairs-of-spells-and-potions
2429-design-a-food-rating-system
2465-shifting-letters-ii
2533-bitwise-xor-of-all-pairings
2626-count-the-number-of-good-subarrays
2685-first-completely-painted-row-or-column
2691-count-vowel-strings-in-ranges
3152-maximum-value-of-an-ordered-triplet-ii
3154-maximum-value-of-an-ordered-triplet-i
3219-make-lexicographically-smallest-array-by-swapping-elements
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
3612-adjacent-increasing-subarrays-detection-i
3619-adjacent-increasing-subarrays-detection-ii
3621-minimum-operations-to-make-array-values-equal-to-k
3744-minimum-operations-to-make-array-elements-zero
3748-sort-matrix-by-diagonals
3794-find-the-minimum-amount-of-time-to-brew-potions
3851-find-sum-of-array-product-of-magical-sequences

Two Pointers

0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0088-merge-sorted-array
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting

Sorting

0088-merge-sorted-array
0368-largest-divisible-subset
1353-find-resultant-array-after-removing-anagrams
2392-successful-pairs-of-spells-and-potions
2887-sort-vowels-in-a-string
3219-make-lexicographically-smallest-array-by-swapping-elements
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

Tree

0102-binary-tree-level-order-traversal
1218-lowest-common-ancestor-of-deepest-leaves
3058-maximum-number-of-k-divisible-components

Breadth-First Search

0102-binary-tree-level-order-traversal
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0794-swim-in-rising-water
1218-lowest-common-ancestor-of-deepest-leaves
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1876-map-of-highest-peak

Binary Tree

0102-binary-tree-level-order-traversal
1218-lowest-common-ancestor-of-deepest-leaves

Database

0175-combine-two-tables
0584-find-customer-referee
0595-big-countries
1908-recyclable-and-low-fat-products

Linked List

0002-add-two-numbers

Math

0002-add-two-numbers
0009-palindrome-number
0013-roman-to-integer
0368-largest-divisible-subset
1426-find-n-unique-integers-sum-up-to-zero
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1993-sum-of-all-subset-xor-totals
2383-add-two-integers
2998-count-symmetric-integers
3201-distribute-candies-among-children-ii
3243-count-the-number-of-powerful-integers
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3336-water-bottles-ii
3462-vowels-game-in-a-string
3548-find-the-count-of-good-integers
3744-minimum-operations-to-make-array-elements-zero
3830-find-closest-person
3851-find-sum-of-array-product-of-magical-sequences

Recursion

0002-add-two-numbers
0010-regular-expression-matching

Hash Table

0013-roman-to-integer
0037-sudoku-solver
1006-vowel-spellchecker
1218-lowest-common-ancestor-of-deepest-leaves
1353-find-resultant-array-after-removing-anagrams
1612-avoid-flood-in-the-city
1786-count-the-number-of-consistent-strings
1834-minimum-number-of-people-to-teach
2059-unique-length-3-palindromic-subsequences
2429-design-a-food-rating-system
2626-count-the-number-of-good-subarrays
2685-first-completely-painted-row-or-column
3437-maximum-total-damage-with-spell-casting
3548-find-the-count-of-good-integers
3621-minimum-operations-to-make-array-values-equal-to-k

Bit Manipulation

1786-count-the-number-of-consistent-strings
1993-sum-of-all-subset-xor-totals
2059-unique-length-3-palindromic-subsequences
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2837-minimum-operations-to-make-the-integer-zero
3233-maximize-the-number-of-partitions-after-operations
3744-minimum-operations-to-make-array-elements-zero
3851-find-sum-of-array-product-of-magical-sequences

Counting

1786-count-the-number-of-consistent-strings
3437-maximum-total-damage-with-spell-casting

Dynamic Programming

0010-regular-expression-matching
0368-largest-divisible-subset
0416-partition-equal-subset-sum
2262-solving-questions-with-brainpower
2408-number-of-people-aware-of-a-secret
3233-maximize-the-number-of-partitions-after-operations
3243-count-the-number-of-powerful-integers
3437-maximum-total-damage-with-spell-casting
3851-find-sum-of-array-product-of-magical-sequences

String Matching

0812-rotate-string
1524-string-matching-in-an-array

Depth-First Search

0417-pacific-atlantic-water-flow
0794-swim-in-rising-water
1218-lowest-common-ancestor-of-deepest-leaves
3058-maximum-number-of-k-divisible-components

Prefix Sum

1537-maximum-score-after-splitting-a-string
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
2145-grid-game
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges
3383-taking-maximum-energy-from-the-mystic-dungeon
3794-find-the-minimum-amount-of-time-to-brew-potions

Greedy

0011-container-with-most-water
1612-avoid-flood-in-the-city
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
2509-minimize-xor

Brainteaser

2533-bitwise-xor-of-all-pairings
2837-minimum-operations-to-make-the-integer-zero
3462-vowels-game-in-a-string

Graph

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

Heap (Priority Queue)

0407-trapping-rain-water-ii
0794-swim-in-rising-water
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1612-avoid-flood-in-the-city
1917-maximum-average-pass-ratio
2429-design-a-food-rating-system

Matrix

0037-sudoku-solver
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0794-swim-in-rising-water
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1876-map-of-highest-peak
2145-grid-game
2685-first-completely-painted-row-or-column
3748-sort-matrix-by-diagonals

Shortest Path

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

Union Find

0794-swim-in-rising-water
3219-make-lexicographically-smallest-array-by-swapping-elements

Backtracking

0037-sudoku-solver
1993-sum-of-all-subset-xor-totals

Combinatorics

1993-sum-of-all-subset-xor-totals
3201-distribute-candies-among-children-ii
3548-find-the-count-of-good-integers
3851-find-sum-of-array-product-of-magical-sequences

Enumeration

1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2837-minimum-operations-to-make-the-integer-zero
2998-count-symmetric-integers
3201-distribute-candies-among-children-ii
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3548-find-the-count-of-good-integers

Binary Search

0794-swim-in-rising-water
1612-avoid-flood-in-the-city
2280-count-good-triplets-in-an-array
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting
3619-adjacent-increasing-subarrays-detection-ii

Divide and Conquer

2280-count-good-triplets-in-an-array

Binary Indexed Tree

2280-count-good-triplets-in-an-array

Segment Tree

2280-count-good-triplets-in-an-array

Merge Sort

2280-count-good-triplets-in-an-array

Ordered Set

2280-count-good-triplets-in-an-array
2429-design-a-food-rating-system

Sliding Window

2626-count-the-number-of-good-subarrays

Geometry

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

Queue

2408-number-of-people-aware-of-a-secret

Simulation

2408-number-of-people-aware-of-a-secret
3336-water-bottles-ii
3794-find-the-minimum-amount-of-time-to-brew-potions

Game Theory

3462-vowels-game-in-a-string

Design

2429-design-a-food-rating-system

Bitmask

3233-maximize-the-number-of-partitions-after-operations
3851-find-sum-of-array-product-of-magical-sequences

About

Collection of LeetCode questions to ace the coding interview!

Topics

Resources

Stars

Watchers

Forks

Languages