Skip to content

Multi-language LeetCode solutions ( Go & C++ & Python & TypeScript & JavaScript ) categorized by data structures and algorithms. Perfect for technical interview preparation.

License

Notifications You must be signed in to change notification settings

mahmoudabozied4/LeetCode_DailyChallenge_2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode_DailyChallenge_2025

LeetCode Topics

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0128-longest-consecutive-sequence
0141-linked-list-cycle
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0349-intersection-of-two-arrays
0389-find-the-difference
0952-word-subsets
1353-find-resultant-array-after-removing-anagrams
1612-avoid-flood-in-the-city
2169-simple-bank-system
2174-next-greater-numerically-balanced-number
2429-design-a-food-rating-system
2661-smallest-missing-non-negative-integer-after-operations
3437-maximum-total-damage-with-spell-casting
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3834-minimum-operations-to-convert-all-elements-to-zero
3863-power-grid-maintenance

Math

0009-palindrome-number
0013-roman-to-integer
0204-count-primes
0231-power-of-two
0268-missing-number
0319-bulb-switcher
0326-power-of-three
0342-power-of-four
0368-largest-divisible-subset
0412-fizz-buzz
0670-maximum-swap
0679-24-game
0867-new-21-game
1013-fibonacci-number
1146-greatest-common-divisor-of-strings
1421-find-numbers-with-even-number-of-digits
1642-water-bottles
1817-calculate-money-in-leetcode-bank
2174-next-greater-numerically-balanced-number
2244-number-of-laser-beams-in-a-bank
2288-count-operations-to-obtain-zero
2307-replace-non-coprime-numbers-in-array
2661-smallest-missing-non-negative-integer-after-operations
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
3336-water-bottles-ii
3581-the-two-sneaky-numbers-of-digitville
3676-smallest-number-with-all-set-bits
3768-check-if-digits-are-equal-in-string-after-operations-i
3851-find-sum-of-array-product-of-magical-sequences

String

0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0058-length-of-last-word
0071-simplify-path
0242-valid-anagram
0389-find-the-difference
0412-fizz-buzz
0474-ones-and-zeroes
0812-rotate-string
0952-word-subsets
1146-greatest-common-divisor-of-strings
1353-find-resultant-array-after-removing-anagrams
1700-minimum-time-to-make-rope-colorful
1737-maximum-nesting-depth-of-the-parentheses
1747-lexicographically-smallest-string-after-applying-operations
1894-merge-strings-alternately
2137-final-value-of-variable-after-performing-operations
2244-number-of-laser-beams-in-a-bank
2429-design-a-food-rating-system
2727-number-of-senior-citizens
3233-maximize-the-number-of-partitions-after-operations
3768-check-if-digits-are-equal-in-string-after-operations-i

Array

0001-two-sum
0011-container-with-most-water
0014-longest-common-prefix
0027-remove-element
0034-find-first-and-last-position-of-element-in-sorted-array
0053-maximum-subarray
0056-merge-intervals
0088-merge-sorted-array
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0136-single-number
0137-single-number-ii
0169-majority-element
0200-number-of-islands
0204-count-primes
0217-contains-duplicate
0268-missing-number
0283-move-zeroes
0334-increasing-triplet-subsequence
0349-intersection-of-two-arrays
0368-largest-divisible-subset
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0474-ones-and-zeroes
0485-max-consecutive-ones
0679-24-game
0682-baseball-game
0794-swim-in-rising-water
0854-making-a-large-island
0952-word-subsets
0954-maximum-sum-circular-subarray
1019-squares-of-a-sorted-array
1168-duplicate-zeros
1353-find-resultant-array-after-removing-anagrams
1421-find-numbers-with-even-number-of-digits
1528-kids-with-the-greatest-number-of-candies
1552-build-an-array-with-stack-operations
1603-running-sum-of-1d-array
1612-avoid-flood-in-the-city
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1791-richest-customer-wealth
2058-concatenation-of-array
2137-final-value-of-variable-after-performing-operations
2169-simple-bank-system
2244-number-of-laser-beams-in-a-bank
2307-replace-non-coprime-numbers-in-array
2343-count-unguarded-cells-in-the-grid
2392-successful-pairs-of-spells-and-potions
2429-design-a-food-rating-system
2618-maximize-the-minimum-powered-city
2661-smallest-missing-non-negative-integer-after-operations
2727-number-of-senior-citizens
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
3251-maximum-area-of-longest-diagonal-rectangle
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3383-taking-maximum-energy-from-the-mystic-dungeon
3437-maximum-total-damage-with-spell-casting
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3612-adjacent-increasing-subarrays-detection-i
3616-make-array-elements-equal-to-zero
3619-adjacent-increasing-subarrays-detection-ii
3620-maximum-number-of-distinct-elements-after-operations
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3794-find-the-minimum-amount-of-time-to-brew-potions
3834-minimum-operations-to-convert-all-elements-to-zero
3851-find-sum-of-array-product-of-magical-sequences
3863-power-grid-maintenance

Dynamic Programming

0053-maximum-subarray
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0368-largest-divisible-subset
0474-ones-and-zeroes
0867-new-21-game
0954-maximum-sum-circular-subarray
1013-fibonacci-number
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
1732-minimum-one-bit-operations-to-make-integers-zero
3233-maximize-the-number-of-partitions-after-operations
3437-maximum-total-damage-with-spell-casting
3851-find-sum-of-array-product-of-magical-sequences

Two Pointers

0011-container-with-most-water
0019-remove-nth-node-from-end-of-list
0027-remove-element
0088-merge-sorted-array
0141-linked-list-cycle
0283-move-zeroes
0349-intersection-of-two-arrays
0908-middle-of-the-linked-list
1019-squares-of-a-sorted-array
1168-duplicate-zeros
1894-merge-strings-alternately
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting

Sorting

0056-merge-intervals
0088-merge-sorted-array
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0349-intersection-of-two-arrays
0368-largest-divisible-subset
0389-find-the-difference
1019-squares-of-a-sorted-array
1353-find-resultant-array-after-removing-anagrams
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting
3620-maximum-number-of-distinct-elements-after-operations
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii

Simulation

0412-fizz-buzz
0682-baseball-game
1552-build-an-array-with-stack-operations
1642-water-bottles
2058-concatenation-of-array
2137-final-value-of-variable-after-performing-operations
2169-simple-bank-system
2288-count-operations-to-obtain-zero
2343-count-unguarded-cells-in-the-grid
3336-water-bottles-ii
3616-make-array-elements-equal-to-zero
3768-check-if-digits-are-equal-in-string-after-operations-i
3794-find-the-minimum-amount-of-time-to-brew-potions

Breadth-First Search

0200-number-of-islands
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0684-redundant-connection
0794-swim-in-rising-water
0820-find-eventual-safe-states
0854-making-a-large-island
1747-lexicographically-smallest-string-after-applying-operations
3863-power-grid-maintenance

Heap (Priority Queue)

0407-trapping-rain-water-ii
0794-swim-in-rising-water
1612-avoid-flood-in-the-city
2429-design-a-food-rating-system
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3863-power-grid-maintenance

Matrix

0200-number-of-islands
0407-trapping-rain-water-ii
0417-pacific-atlantic-water-flow
0794-swim-in-rising-water
0854-making-a-large-island
1791-richest-customer-wealth
2244-number-of-laser-beams-in-a-bank
2343-count-unguarded-cells-in-the-grid

Greedy

0011-container-with-most-water
0334-increasing-triplet-subsequence
0670-maximum-swap
1612-avoid-flood-in-the-city
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1700-minimum-time-to-make-rope-colorful
2618-maximize-the-minimum-powered-city
2661-smallest-missing-non-negative-integer-after-operations
3620-maximum-number-of-distinct-elements-after-operations
3834-minimum-operations-to-convert-all-elements-to-zero

Depth-First Search

0200-number-of-islands
0386-lexicographical-numbers
0417-pacific-atlantic-water-flow
0684-redundant-connection
0794-swim-in-rising-water
0820-find-eventual-safe-states
0854-making-a-large-island
1747-lexicographically-smallest-string-after-applying-operations
3863-power-grid-maintenance

Binary Search

0034-find-first-and-last-position-of-element-in-sorted-array
0268-missing-number
0349-intersection-of-two-arrays
0794-swim-in-rising-water
1612-avoid-flood-in-the-city
2392-successful-pairs-of-spells-and-potions
2618-maximize-the-minimum-powered-city
3437-maximum-total-damage-with-spell-casting
3619-adjacent-increasing-subarrays-detection-ii
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii

Union Find

0128-longest-consecutive-sequence
0200-number-of-islands
0684-redundant-connection
0794-swim-in-rising-water
0854-making-a-large-island
3863-power-grid-maintenance

Trie

0014-longest-common-prefix
0386-lexicographical-numbers

Prefix Sum

1603-running-sum-of-1d-array
2618-maximize-the-minimum-powered-city
3383-taking-maximum-energy-from-the-mystic-dungeon
3616-make-array-elements-equal-to-zero
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii
3794-find-the-minimum-amount-of-time-to-brew-potions

Counting

0169-majority-element
2174-next-greater-numerically-balanced-number
3437-maximum-total-damage-with-spell-casting

Bit Manipulation

0136-single-number
0137-single-number-ii
0231-power-of-two
0268-missing-number
0342-power-of-four
0389-find-the-difference
1732-minimum-one-bit-operations-to-make-integers-zero
3233-maximize-the-number-of-partitions-after-operations
3676-smallest-number-with-all-set-bits
3851-find-sum-of-array-product-of-magical-sequences

Combinatorics

3768-check-if-digits-are-equal-in-string-after-operations-i
3851-find-sum-of-array-product-of-magical-sequences

Bitmask

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

Stack

0020-valid-parentheses
0071-simplify-path
0682-baseball-game
1552-build-an-array-with-stack-operations
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1737-maximum-nesting-depth-of-the-parentheses
2307-replace-non-coprime-numbers-in-array
3834-minimum-operations-to-convert-all-elements-to-zero

Sliding Window

0003-longest-substring-without-repeating-characters
0867-new-21-game
2618-maximize-the-minimum-powered-city
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3622-maximum-frequency-of-an-element-after-performing-operations-i
3640-maximum-frequency-of-an-element-after-performing-operations-ii

Enumeration

0204-count-primes
1747-lexicographically-smallest-string-after-applying-operations
2174-next-greater-numerically-balanced-number

Number Theory

0204-count-primes
2307-replace-non-coprime-numbers-in-array
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
3768-check-if-digits-are-equal-in-string-after-operations-i

Recursion

0231-power-of-two
0326-power-of-three
0342-power-of-four
1013-fibonacci-number

Backtracking

0679-24-game
2174-next-greater-numerically-balanced-number

Graph

0684-redundant-connection
0820-find-eventual-safe-states
3863-power-grid-maintenance

String Matching

0812-rotate-string

Topological Sort

0820-find-eventual-safe-states

Probability and Statistics

0867-new-21-game

Design

2169-simple-bank-system
2429-design-a-food-rating-system

Ordered Set

2429-design-a-food-rating-system
3863-power-grid-maintenance

Divide and Conquer

0053-maximum-subarray
0169-majority-element
0954-maximum-sum-circular-subarray

Queue

0954-maximum-sum-circular-subarray
2618-maximize-the-minimum-powered-city

Monotonic Queue

0954-maximum-sum-circular-subarray

Memoization

1013-fibonacci-number
1732-minimum-one-bit-operations-to-make-integers-zero

Brainteaser

0319-bulb-switcher

Linked List

0019-remove-nth-node-from-end-of-list
0141-linked-list-cycle
0908-middle-of-the-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Monotonic Stack

1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
3834-minimum-operations-to-convert-all-elements-to-zero

About

Multi-language LeetCode solutions ( Go & C++ & Python & TypeScript & JavaScript ) categorized by data structures and algorithms. Perfect for technical interview preparation.

Topics

Resources

License

Stars

Watchers

Forks