Skip to content

TiwariPiyush25/Daily_Leetcode_Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello, Welcome to my daily grind of solving LeetCode problems! This repository is a structured archive of my journey through algorithmic challenges.

LeetCode Topics

Array

0011-container-with-most-water
0049-group-anagrams
0063-unique-paths-ii
0064-minimum-path-sum
0150-evaluate-reverse-polish-notation
0189-rotate-array
0198-house-robber
0204-count-primes
0219-contains-duplicate-ii
0238-product-of-array-except-self
0322-coin-change
0349-intersection-of-two-arrays
0378-kth-smallest-element-in-a-sorted-matrix
0416-partition-equal-subset-sum
0448-find-all-numbers-disappeared-in-an-array
0485-max-consecutive-ones
0494-target-sum
0575-distribute-candies
0628-maximum-product-of-three-numbers
0645-set-mismatch
0654-maximum-binary-tree
0747-min-cost-climbing-stairs
1001-n-repeated-element-in-size-2n-array
1031-add-to-array-form-of-integer
1046-max-consecutive-ones-iii
1231-replace-elements-with-greatest-element-on-right-side
1293-three-consecutive-odds
1386-shift-2d-grid
1392-find-the-difference-of-two-arrays
1402-count-square-submatrices-with-all-ones
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1482-how-many-numbers-are-smaller-than-the-current-number
1496-lucky-numbers-in-a-matrix
1510-find-lucky-integer-in-an-array
1528-kids-with-the-greatest-number-of-candies
1548-check-if-all-1s-are-at-least-length-k-places-away
1552-build-an-array-with-stack-operations
1560-number-of-students-doing-homework-at-a-given-time
1580-shuffle-the-array
1626-can-make-arithmetic-progression-from-sequence
1741-sort-array-by-increasing-frequency
1781-check-if-two-string-arrays-are-equivalent
1791-richest-customer-wealth
1848-sum-of-unique-elements
1950-sign-of-the-product-of-an-array
2048-build-array-from-permutation
2137-final-value-of-variable-after-performing-operations
2204-find-subsequence-of-length-k-with-the-largest-sum
2211-k-radius-subarray-averages
2231-find-first-palindromic-string-in-the-array
2274-keep-multiplying-found-values-by-two
2502-sort-the-people
2614-maximum-count-of-positive-integer-and-negative-integer
2625-increment-submatrices-by-one
2844-sum-of-squares-of-special-elements
2876-number-of-employees-who-met-the-target
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3194-find-words-containing-character
3226-minimum-number-game
3330-modify-the-matrix
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3998-minimum-operations-to-equalize-array

Hash Table

0049-group-anagrams
0202-happy-number
0219-contains-duplicate-ii
0349-intersection-of-two-arrays
0383-ransom-note
0448-find-all-numbers-disappeared-in-an-array
0451-sort-characters-by-frequency
0567-permutation-in-string
0575-distribute-candies
0645-set-mismatch
0653-two-sum-iv-input-is-a-bst
0782-jewels-and-stones
1001-n-repeated-element-in-size-2n-array
1029-vertical-order-traversal-of-a-binary-tree
1297-maximum-number-of-balloons
1392-find-the-difference-of-two-arrays
1482-how-many-numbers-are-smaller-than-the-current-number
1510-find-lucky-integer-in-an-array
1741-sort-array-by-increasing-frequency
1848-sum-of-unique-elements
1960-check-if-the-sentence-is-pangram
1987-substrings-of-size-three-with-distinct-characters
2204-find-subsequence-of-length-k-with-the-largest-sum
2226-rings-and-rods
2274-keep-multiplying-found-values-by-two
2502-sort-the-people
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3872-find-most-frequent-vowel-and-consonant

Sorting

0049-group-anagrams
0147-insertion-sort-list
0349-intersection-of-two-arrays
0378-kth-smallest-element-in-a-sorted-matrix
0451-sort-characters-by-frequency
0628-maximum-product-of-three-numbers
0645-set-mismatch
1029-vertical-order-traversal-of-a-binary-tree
1463-the-k-weakest-rows-in-a-matrix
1482-how-many-numbers-are-smaller-than-the-current-number
1626-can-make-arithmetic-progression-from-sequence
1741-sort-array-by-increasing-frequency
2204-find-subsequence-of-length-k-with-the-largest-sum
2274-keep-multiplying-found-values-by-two
2502-sort-the-people
2646-kth-largest-sum-in-a-binary-tree
3226-minimum-number-game

Heap (Priority Queue)

0378-kth-smallest-element-in-a-sorted-matrix
0451-sort-characters-by-frequency
1463-the-k-weakest-rows-in-a-matrix
2204-find-subsequence-of-length-k-with-the-largest-sum
3226-minimum-number-game

Math

0002-add-two-numbers
0009-palindrome-number
0062-unique-paths
0150-evaluate-reverse-polish-notation
0171-excel-sheet-column-number
0189-rotate-array
0202-happy-number
0204-count-primes
0279-perfect-squares
0441-arranging-coins
0445-add-two-numbers-ii
0507-perfect-number
0628-maximum-product-of-three-numbers
0728-self-dividing-numbers
1013-fibonacci-number
1031-add-to-array-form-of-integer
1236-n-th-tribonacci-number
1260-day-of-the-year
1289-day-of-the-week
1406-subtract-the-product-and-sum-of-digits-of-an-integer
1444-number-of-steps-to-reduce-a-number-to-zero
1610-xor-operation-in-an-array
1642-water-bottles
1806-count-of-matches-in-tournament
1920-determine-color-of-a-chessboard-square
1950-sign-of-the-product-of-an-array
2238-a-number-after-a-double-reversal
2288-count-operations-to-obtain-zero
2507-number-of-common-factors
2571-find-the-pivot-integer
2871-double-a-number-represented-as-a-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3172-divisible-and-non-divisible-sums-difference
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3581-the-two-sneaky-numbers-of-digitville
3600-find-the-k-th-character-in-string-game-i
3768-check-if-digits-are-equal-in-string-after-operations-i

String

0049-group-anagrams
0072-edit-distance
0151-reverse-words-in-a-string
0171-excel-sheet-column-number
0383-ransom-note
0392-is-subsequence
0434-number-of-segments-in-a-string
0451-sort-characters-by-frequency
0516-longest-palindromic-subsequence
0520-detect-capital
0541-reverse-string-ii
0551-student-attendance-record-i
0567-permutation-in-string
0583-delete-operation-for-two-strings
0657-robot-return-to-origin
0782-jewels-and-stones
0812-rotate-string
0953-reverse-only-letters
1205-defanging-an-ip-address
1250-longest-common-subsequence
1260-day-of-the-year
1297-maximum-number-of-balloons
1437-minimum-insertion-steps-to-make-a-string-palindrome
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1660-thousand-separator
1698-replace-all-s-to-avoid-consecutive-repeating-characters
1781-check-if-two-string-arrays-are-equivalent
1823-determine-if-string-halves-are-alike
1920-determine-color-of-a-chessboard-square
1954-replace-all-digits-with-characters
1960-check-if-the-sentence-is-pangram
1987-substrings-of-size-three-with-distinct-characters
2137-final-value-of-variable-after-performing-operations
2226-rings-and-rods
2231-find-first-palindromic-string-in-the-array
2391-strong-password-checker-ii
2502-sort-the-people
2819-remove-trailing-zeros-from-a-string
2886-faulty-keyboard
3194-find-words-containing-character
3379-score-of-a-string
3453-generate-binary-strings-without-adjacent-zeros
3768-check-if-digits-are-equal-in-string-after-operations-i
3811-reverse-degree-of-a-string
3872-find-most-frequent-vowel-and-consonant
3893-generate-tag-for-video-caption

Bucket Sort

0451-sort-characters-by-frequency

Counting

0383-ransom-note
0451-sort-characters-by-frequency
1297-maximum-number-of-balloons
1510-find-lucky-integer-in-an-array
1823-determine-if-string-halves-are-alike
1848-sum-of-unique-elements
1987-substrings-of-size-three-with-distinct-characters
2614-maximum-count-of-positive-integer-and-negative-integer
3872-find-most-frequent-vowel-and-consonant

Simulation

0657-robot-return-to-origin
1386-shift-2d-grid
1552-build-an-array-with-stack-operations
1642-water-bottles
1806-count-of-matches-in-tournament
2048-build-array-from-permutation
2137-final-value-of-variable-after-performing-operations
2274-keep-multiplying-found-values-by-two
2288-count-operations-to-obtain-zero
2299-merge-nodes-in-between-zeros
2886-faulty-keyboard
3226-minimum-number-game
3600-find-the-k-th-character-in-string-game-i
3768-check-if-digits-are-equal-in-string-after-operations-i
3811-reverse-degree-of-a-string
3893-generate-tag-for-video-caption

Two Pointers

0011-container-with-most-water
0151-reverse-words-in-a-string
0189-rotate-array
0202-happy-number
0349-intersection-of-two-arrays
0392-is-subsequence
0528-swapping-nodes-in-a-linked-list
0541-reverse-string-ii
0567-permutation-in-string
0653-two-sum-iv-input-is-a-bst
0953-reverse-only-letters
2231-find-first-palindromic-string-in-the-array

Bit Manipulation

0191-number-of-1-bits
0645-set-mismatch
1444-number-of-steps-to-reduce-a-number-to-zero
1610-xor-operation-in-an-array
3453-generate-binary-strings-without-adjacent-zeros
3600-find-the-k-th-character-in-string-game-i
3998-minimum-operations-to-equalize-array

Matrix

0063-unique-paths-ii
0064-minimum-path-sum
0378-kth-smallest-element-in-a-sorted-matrix
1386-shift-2d-grid
1402-count-square-submatrices-with-all-ones
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1791-richest-customer-wealth
2625-increment-submatrices-by-one
3330-modify-the-matrix

Enumeration

0204-count-primes
2507-number-of-common-factors
2844-sum-of-squares-of-special-elements

Number Theory

0204-count-primes
2507-number-of-common-factors
2903-insert-greatest-common-divisors-in-linked-list
3768-check-if-digits-are-equal-in-string-after-operations-i

Tree

0111-minimum-depth-of-binary-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0671-second-minimum-node-in-a-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree
2646-kth-largest-sum-in-a-binary-tree

Depth-First Search

0111-minimum-depth-of-binary-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0653-two-sum-iv-input-is-a-bst
0671-second-minimum-node-in-a-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree

Binary Tree

0111-minimum-depth-of-binary-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0671-second-minimum-node-in-a-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree
2646-kth-largest-sum-in-a-binary-tree

Dynamic Programming

0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0072-edit-distance
0198-house-robber
0279-perfect-squares
0322-coin-change
0392-is-subsequence
0416-partition-equal-subset-sum
0494-target-sum
0516-longest-palindromic-subsequence
0583-delete-operation-for-two-strings
0747-min-cost-climbing-stairs
1013-fibonacci-number
1236-n-th-tribonacci-number
1250-longest-common-subsequence
1402-count-square-submatrices-with-all-ones
1437-minimum-insertion-steps-to-make-a-string-palindrome

Recursion

0002-add-two-numbers
0025-reverse-nodes-in-k-group
1013-fibonacci-number
2573-remove-nodes-from-linked-list
3600-find-the-k-th-character-in-string-game-i

Memoization

1013-fibonacci-number
1236-n-th-tribonacci-number

Breadth-First Search

0111-minimum-depth-of-binary-tree
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0279-perfect-squares
0322-coin-change
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0653-two-sum-iv-input-is-a-bst
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1035-cousins-in-binary-tree
1254-deepest-leaves-sum
2646-kth-largest-sum-in-a-binary-tree

Binary Search Tree

0278-first-bad-version
0349-intersection-of-two-arrays
0374-guess-number-higher-or-lower
0378-kth-smallest-element-in-a-sorted-matrix
0441-arranging-coins
0530-minimum-absolute-difference-in-bst
0653-two-sum-iv-input-is-a-bst
0933-increasing-order-search-tree
1046-max-consecutive-ones-iii
1114-binary-search-tree-to-greater-sum-tree
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
2614-maximum-count-of-positive-integer-and-negative-integer

Linked List

0002-add-two-numbers
0025-reverse-nodes-in-k-group
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0147-insertion-sort-list
0445-add-two-numbers-ii
0528-swapping-nodes-in-a-linked-list
2196-reverse-nodes-in-even-length-groups
2299-merge-nodes-in-between-zeros
2573-remove-nodes-from-linked-list
2871-double-a-number-represented-as-a-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Stack

0150-evaluate-reverse-polish-notation
0445-add-two-numbers-ii
0654-maximum-binary-tree
0933-increasing-order-search-tree
1552-build-an-array-with-stack-operations
2573-remove-nodes-from-linked-list
2871-double-a-number-represented-as-a-linked-list

Greedy

0011-container-with-most-water

Interactive

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

Monotonic Stack

0654-maximum-binary-tree
2573-remove-nodes-from-linked-list

Counting Sort

1482-how-many-numbers-are-smaller-than-the-current-number

Combinatorics

0062-unique-paths
3768-check-if-digits-are-equal-in-string-after-operations-i

Brainteaser

3998-minimum-operations-to-equalize-array

Backtracking

0494-target-sum
3453-generate-binary-strings-without-adjacent-zeros

Divide and Conquer

0191-number-of-1-bits
0654-maximum-binary-tree

Sliding Window

0219-contains-duplicate-ii
0567-permutation-in-string
1046-max-consecutive-ones-iii
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1987-substrings-of-size-three-with-distinct-characters
2211-k-radius-subarray-averages

String Matching

0812-rotate-string

Prefix Sum

0238-product-of-array-except-self
1046-max-consecutive-ones-iii
2571-find-the-pivot-integer
2625-increment-submatrices-by-one