Skip to content

Collection of LeetCode questions to ace the coding interview!

Notifications You must be signed in to change notification settings

hazzemSaid/leet-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

683 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

This repository contains my LeetCode solutions in multiple programming languages.

Statistics

  • Total Solved: 149
  • Easy: 47
  • Medium: 83
  • Hard: 19

Easy (47)

# Problem Languages
1 two sum cpp js
9 palindrome number cpp
110 balanced binary tree cpp
118 pascals triangle cpp
175 combine two tables sql
197 rising temperature sql
206 reverse linked list cpp
231 power of two cpp
234 Palindrome Linked List cpp
577 employee bonus sql
596 classes with at least 5 students sql
610 triangle judgement sql
619 biggest single number sql
620 not boring movies sql
744 find smallest letter greater than target cpp
1075 project employees i sql
1141 user activity for the past 30 days i sql
1200 minimum absolute difference cpp
1211 queries quality and percentage sql
1251 average selling price sql
1266 minimum time visiting all points cpp
1280 students and examinations sql
1524 string matching in an array cpp
1537 maximum score after splitting a string cpp
1581 customer who visited but did not make any transactions sql
1633 percentage of users attended a contest sql
1661 average time of process per machine sql
1729 find followers count sql
1731 the number of employees which report to each employee sql
1789 primary department for each employee sql
1915 check if one string swap can make strings equal js
1927 maximum ascending subarray sum js
1984 minimum difference between highest and lowest of k scores cpp
2274 keep multiplying found values by two cpp
2292 counting words with a given prefix cpp
2316 count hills and valleys in an array cpp
2356 number of unique subjects taught by each teacher sql
3010 divide an array into subarrays with minimum cost i cpp
3309 count prefix and suffix pairs i cpp
3372 longest strictly increasing or strictly decreasing subarray cpp
3379 transformed array cpp
3429 special array i cpp
3447 clear digits js
3507 minimum pair removal to sort array i cpp
3637 trionic array i cpp
3656 minimum number of operations to make elements in array distinct cpp
3790 fruits into baskets ii cpp

Medium (83)

# Problem Languages
38 count and say cpp
143 reorder list cpp
166 fraction to recurring decimal cpp
180 consecutive numbers sql
442 find all duplicates in an array cpp
550 game play analysis iv sql
570 managers with at least 5 direct reports sql
640 solve the equation cpp
684 redundant connection cpp
768 partition labels cpp
820 find eventual safe states cpp
940 fruit into baskets cpp
948 bag of tokens cpp
952 word subsets cpp
1045 customers who bought all products sql
1070 product sales analysis iii sql
1161 maximum level sum of a binary tree cpp
1164 product price at a given date sql
1174 immediate food delivery ii sql
1193 monthly transactions i sql
1218 lowest common ancestor of deepest leaves cpp
1335 maximum candies allocated to k children cpp
1339 maximum product of splitted binary tree cpp
1364 tuple with same product js
1382 balance a binary search tree cpp
1390 four divisors cpp
1396 count servers that communicate cpp
1477 product of the last k numbers js
1502 construct k palindrome strings cpp
1516 the k th lexicographical string of all happy strings of length n cpp
1558 course schedule iv cpp
1653 minimum deletions to make string balanced cpp
1818 maximum score from removing substrings cpp
1819 construct the lexicographically largest valid sequence cpp
1876 map of highest peak cpp
1877 minimize maximum pair sum in array cpp
1895 minimum number of operations to move all balls to each box cpp
1917 maximum average pass ratio cpp
1934 confirmation rate sql
1975 maximum matrix sum ts
2021 remove all occurrences of a substring js
2050 count good numbers cpp
2059 unique length 3 palindromic subsequences cpp
2090 number of ways to arrive at destination cpp
2107 find unique binary string cpp js
2145 grid game cpp
2220 find all possible recipes from given supplies cpp
2221 check if a parentheses string can be valid cpp
2265 partition array according to given pivot js
2358 number of ways to split array cpp
2448 count number of bad pairs js
2456 construct smallest number from di string cpp
2465 shifting letters ii cpp
2473 max sum of a pair with equal sum of digits cpp
2478 longest nice subarray cpp
2497 maximum matching of players with trainers cpp
2498 smallest subarrays with maximum bitwise or cpp
2509 minimize xor cpp
2529 range product queries of powers cpp
2533 bitwise xor of all pairings cpp
2610 closest prime numbers in range cpp
2685 first completely painted row or column cpp
2691 count vowel strings in ranges cpp
2764 maximum number of fish in a grid cpp
2766 find the prefix common array of two arrays cpp
2792 neighboring bitwise xor cpp
2975 maximum square area by removing fences from a field cpp
2976 minimum cost to convert string i cpp
3018 make string a subsequence using cyclic increments cpp
3152 maximum value of an ordered triplet ii cpp
3219 make lexicographically smallest array by swapping elements cpp
3278 find the number of ways to place people i cpp
3315 construct the minimum bitwise array ii cpp
3430 count days without meetings cpp
3453 separate squares i cpp
3455 minimum length of string after operations cpp
3569 count of substrings containing every vowel and k consonants ii cpp
3634 minimum removals to balance array cpp
3643 zero array transformation ii cpp
3650 minimum cost path with edge reversals cpp
3678 design task manager cpp
3719 longest balanced subarray i cpp
3794 find the minimum amount of time to brew potions cpp

Hard (19)

# Problem Languages
41 first missing positive cpp
407 trapping rain water ii cpp
759 set intersection size at least two cpp
854 making a large island cpp
1411 number of ways to paint n 3 grid cpp
1458 max dot product of two subsequences cpp
1485 minimum cost to make at least one valid path in a grid cpp
2141 maximum running time of n computers cpp
2229 maximum fruits harvested after at most k steps cpp
2246 maximum employees to be invited to a meeting cpp
2435 paths in matrix whose sum is divisible by k cpp
2583 divide nodes into the maximum number of groups cpp
2689 rearranging fruits cpp
2977 minimum cost to convert string ii cpp
3013 divide an array into subarrays with minimum cost ii cpp
3510 minimum pair removal to sort array ii cpp
3548 find the count of good integers cpp
3640 maximum frequency of an element after performing operations ii cpp
3651 minimum cost path with teleportations cpp

LeetCode Topics

Array

0001-two-sum cpp js
0118-pascals-triangle cpp
0744-find-smallest-letter-greater-than-target cpp
1200-minimum-absolute-difference cpp
1266-minimum-time-visiting-all-points cpp
1524-string-matching-in-an-array cpp
1927-maximum-ascending-subarray-sum js
1984-minimum-difference-between-highest-and-lowest-of-k-scores cpp
2274-keep-multiplying-found-values-by-two cpp
2292-counting-words-with-a-given-prefix cpp
2316-count-hills-and-valleys-in-an-array cpp
3010-divide-an-array-into-subarrays-with-minimum-cost-i cpp
3309-count-prefix-and-suffix-pairs-i cpp
3372-longest-strictly-increasing-or-strictly-decreasing-subarray cpp
3379-transformed-array cpp
3429-special-array-i cpp
3637-trionic-array-i cpp
3656-minimum-number-of-operations-to-make-elements-in-array-distinct cpp
3790-fruits-into-baskets-ii cpp
0940-fruit-into-baskets cpp
0952-word-subsets cpp
1335-maximum-candies-allocated-to-k-children cpp
1364-tuple-with-same-product js
1390-four-divisors cpp
1396-count-servers-that-communicate cpp
1477-product-of-the-last-k-numbers js
1819-construct-the-lexicographically-largest-valid-sequence cpp
1876-map-of-highest-peak cpp
1877-minimize-maximum-pair-sum-in-array cpp
1895-minimum-number-of-operations-to-move-all-balls-to-each-box cpp
1917-maximum-average-pass-ratio cpp
1975-maximum-matrix-sum ts
2107-find-unique-binary-string cpp js
2145-grid-game cpp
2220-find-all-possible-recipes-from-given-supplies cpp
2265-partition-array-according-to-given-pivot js
2358-number-of-ways-to-split-array cpp
2448-count-number-of-bad-pairs js
2465-shifting-letters-ii cpp
2473-max-sum-of-a-pair-with-equal-sum-of-digits cpp
2478-longest-nice-subarray cpp
2497-maximum-matching-of-players-with-trainers cpp
2498-smallest-subarrays-with-maximum-bitwise-or cpp
2529-range-product-queries-of-powers cpp
2533-bitwise-xor-of-all-pairings cpp
2685-first-completely-painted-row-or-column cpp
2691-count-vowel-strings-in-ranges cpp
2764-maximum-number-of-fish-in-a-grid cpp
2766-find-the-prefix-common-array-of-two-arrays cpp
2792-neighboring-bitwise-xor cpp
2975-maximum-square-area-by-removing-fences-from-a-field cpp
2976-minimum-cost-to-convert-string-i cpp
3152-maximum-value-of-an-ordered-triplet-ii cpp
3219-make-lexicographically-smallest-array-by-swapping-elements cpp
3278-find-the-number-of-ways-to-place-people-i cpp
3315-construct-the-minimum-bitwise-array-ii cpp
3430-count-days-without-meetings cpp
3453-separate-squares-i cpp
3634-minimum-removals-to-balance-array cpp
3643-zero-array-transformation-ii cpp
3719-longest-balanced-subarray-i cpp
3794-find-the-minimum-amount-of-time-to-brew-potions cpp
0407-trapping-rain-water-ii cpp
0759-set-intersection-size-at-least-two cpp
0854-making-a-large-island cpp
1458-max-dot-product-of-two-subsequences cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp
2141-maximum-running-time-of-n-computers cpp
2229-maximum-fruits-harvested-after-at-most-k-steps cpp
2435-paths-in-matrix-whose-sum-is-divisible-by-k cpp
2689-rearranging-fruits cpp
2977-minimum-cost-to-convert-string-ii cpp
3640-maximum-frequency-of-an-element-after-performing-operations-ii cpp
0035-search-insert-position cpp
3651-minimum-cost-path-with-teleportations cpp

Backtracking

1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n cpp
1819-construct-the-lexicographically-largest-valid-sequence cpp
2107-find-unique-binary-string cpp js
2456-construct-smallest-number-from-di-string cpp

Binary Search

0744-find-smallest-letter-greater-than-target cpp
3790-fruits-into-baskets-ii cpp
1335-maximum-candies-allocated-to-k-children cpp
2498-smallest-subarrays-with-maximum-bitwise-or cpp
3453-separate-squares-i cpp
3643-zero-array-transformation-ii cpp
2141-maximum-running-time-of-n-computers cpp
2229-maximum-fruits-harvested-after-at-most-k-steps cpp
3640-maximum-frequency-of-an-element-after-performing-operations-ii cpp
0035-search-insert-position cpp

Binary Search Tree

1382-balance-a-binary-search-tree cpp

Binary Tree

0110-balanced-binary-tree cpp
1161-maximum-level-sum-of-a-binary-tree cpp
1218-lowest-common-ancestor-of-deepest-leaves cpp
1339-maximum-product-of-splitted-binary-tree cpp
1382-balance-a-binary-search-tree cpp

Bit Manipulation

0231-power-of-two cpp
2059-unique-length-3-palindromic-subsequences cpp
2478-longest-nice-subarray cpp
2498-smallest-subarrays-with-maximum-bitwise-or cpp
2509-minimize-xor cpp
2529-range-product-queries-of-powers cpp
2533-bitwise-xor-of-all-pairings cpp
2766-find-the-prefix-common-array-of-two-arrays cpp
2792-neighboring-bitwise-xor cpp
3315-construct-the-minimum-bitwise-array-ii cpp

Brainteaser

2533-bitwise-xor-of-all-pairings cpp

Breadth-First Search

0684-redundant-connection cpp
0820-find-eventual-safe-states cpp
1161-maximum-level-sum-of-a-binary-tree cpp
1218-lowest-common-ancestor-of-deepest-leaves cpp
1396-count-servers-that-communicate cpp
1558-course-schedule-iv cpp
1876-map-of-highest-peak cpp
2764-maximum-number-of-fish-in-a-grid cpp
0407-trapping-rain-water-ii cpp
0854-making-a-large-island cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp
2583-divide-nodes-into-the-maximum-number-of-groups cpp

Combinatorics

3548-find-the-count-of-good-integers cpp

Counting

1915-check-if-one-string-swap-can-make-strings-equal js
1364-tuple-with-same-product js
1396-count-servers-that-communicate cpp
1502-construct-k-palindrome-strings cpp
2448-count-number-of-bad-pairs js
3455-minimum-length-of-string-after-operations cpp

Data Stream

1477-product-of-the-last-k-numbers js

Database

0175-combine-two-tables sql
0197-rising-temperature sql
0577-employee-bonus sql
0596-classes-with-at-least-5-students sql
0610-triangle-judgement sql
0619-biggest-single-number sql
0620-not-boring-movies sql
1075-project-employees-i sql
1141-user-activity-for-the-past-30-days-i sql
1211-queries-quality-and-percentage sql
1251-average-selling-price sql
1280-students-and-examinations sql
1581-customer-who-visited-but-did-not-make-any-transactions sql
1633-percentage-of-users-attended-a-contest sql
1661-average-time-of-process-per-machine sql
1729-find-followers-count sql
1731-the-number-of-employees-which-report-to-each-employee sql
1789-primary-department-for-each-employee sql
2356-number-of-unique-subjects-taught-by-each-teacher sql
0180-consecutive-numbers sql
0550-game-play-analysis-iv sql
0570-managers-with-at-least-5-direct-reports sql
1045-customers-who-bought-all-products sql
1070-product-sales-analysis-iii sql
1164-product-price-at-a-given-date sql
1174-immediate-food-delivery-ii sql
1193-monthly-transactions-i sql
1934-confirmation-rate sql

Depth-First Search

0110-balanced-binary-tree cpp
0684-redundant-connection cpp
0820-find-eventual-safe-states cpp
1161-maximum-level-sum-of-a-binary-tree cpp
1218-lowest-common-ancestor-of-deepest-leaves cpp
1339-maximum-product-of-splitted-binary-tree cpp
1382-balance-a-binary-search-tree cpp
1396-count-servers-that-communicate cpp
1558-course-schedule-iv cpp
2764-maximum-number-of-fish-in-a-grid cpp
0854-making-a-large-island cpp
2246-maximum-employees-to-be-invited-to-a-meeting cpp

Design

1477-product-of-the-last-k-numbers js
3678-design-task-manager cpp

Divide and Conquer

1382-balance-a-binary-search-tree cpp
3719-longest-balanced-subarray-i cpp

Dynamic Programming

0118-pascals-triangle cpp
1653-minimum-deletions-to-make-string-balanced cpp
2090-number-of-ways-to-arrive-at-destination cpp
1411-number-of-ways-to-paint-n-3-grid cpp
1458-max-dot-product-of-two-subsequences cpp
2435-paths-in-matrix-whose-sum-is-divisible-by-k cpp
2977-minimum-cost-to-convert-string-ii cpp
3651-minimum-cost-path-with-teleportations cpp

Enumeration

3010-divide-an-array-into-subarrays-with-minimum-cost-i cpp
2975-maximum-square-area-by-removing-fences-from-a-field cpp
3278-find-the-number-of-ways-to-place-people-i cpp
3548-find-the-count-of-good-integers cpp

Geometry

1266-minimum-time-visiting-all-points cpp
3278-find-the-number-of-ways-to-place-people-i cpp

Graph

0684-redundant-connection cpp
0820-find-eventual-safe-states cpp
1558-course-schedule-iv cpp
2090-number-of-ways-to-arrive-at-destination cpp
2220-find-all-possible-recipes-from-given-supplies cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp
2246-maximum-employees-to-be-invited-to-a-meeting cpp
2583-divide-nodes-into-the-maximum-number-of-groups cpp

Graph Theory

2976-minimum-cost-to-convert-string-i cpp
3650-minimum-cost-path-with-edge-reversals cpp
2977-minimum-cost-to-convert-string-ii cpp

Greedy

0768-partition-labels cpp
1382-balance-a-binary-search-tree cpp
1502-construct-k-palindrome-strings cpp
1818-maximum-score-from-removing-substrings cpp
1877-minimize-maximum-pair-sum-in-array cpp
1917-maximum-average-pass-ratio cpp
1975-maximum-matrix-sum ts
2221-check-if-a-parentheses-string-can-be-valid cpp
2456-construct-smallest-number-from-di-string cpp
2497-maximum-matching-of-players-with-trainers cpp
2509-minimize-xor cpp
0759-set-intersection-size-at-least-two cpp
2141-maximum-running-time-of-n-computers cpp
2689-rearranging-fruits cpp

Hash Function

3309-count-prefix-and-suffix-pairs-i cpp

Hash Table

0001-two-sum cpp js
1915-check-if-one-string-swap-can-make-strings-equal js
2274-keep-multiplying-found-values-by-two cpp
3656-minimum-number-of-operations-to-make-elements-in-array-distinct cpp
0166-fraction-to-recurring-decimal cpp
0768-partition-labels cpp
0940-fruit-into-baskets cpp
0952-word-subsets cpp
1218-lowest-common-ancestor-of-deepest-leaves cpp
1364-tuple-with-same-product js
1502-construct-k-palindrome-strings cpp
2059-unique-length-3-palindromic-subsequences cpp
2107-find-unique-binary-string cpp js
2220-find-all-possible-recipes-from-given-supplies cpp
2448-count-number-of-bad-pairs js
2473-max-sum-of-a-pair-with-equal-sum-of-digits cpp
2685-first-completely-painted-row-or-column cpp
2766-find-the-prefix-common-array-of-two-arrays cpp
2975-maximum-square-area-by-removing-fences-from-a-field cpp
3455-minimum-length-of-string-after-operations cpp
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii cpp
3678-design-task-manager cpp
3719-longest-balanced-subarray-i cpp
2689-rearranging-fruits cpp
3548-find-the-count-of-good-integers cpp

Heap (Priority Queue)

1917-maximum-average-pass-ratio cpp
2473-max-sum-of-a-pair-with-equal-sum-of-digits cpp
3650-minimum-cost-path-with-edge-reversals cpp
3678-design-task-manager cpp
0407-trapping-rain-water-ii cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp

Math

0009-palindrome-number cpp
0231-power-of-two cpp
1266-minimum-time-visiting-all-points cpp
0166-fraction-to-recurring-decimal cpp
0640-solve-the-equation cpp
1390-four-divisors cpp
1477-product-of-the-last-k-numbers js
2050-count-good-numbers cpp
2448-count-number-of-bad-pairs js
2610-closest-prime-numbers-in-range cpp
3278-find-the-number-of-ways-to-place-people-i cpp
3548-find-the-count-of-good-integers cpp

Matrix

1396-count-servers-that-communicate cpp
1876-map-of-highest-peak cpp
1975-maximum-matrix-sum ts
2145-grid-game cpp
2685-first-completely-painted-row-or-column cpp
2764-maximum-number-of-fish-in-a-grid cpp
0407-trapping-rain-water-ii cpp
0854-making-a-large-island cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp
2435-paths-in-matrix-whose-sum-is-divisible-by-k cpp
3651-minimum-cost-path-with-teleportations cpp

Number Theory

2610-closest-prime-numbers-in-range cpp

Ordered Set

3790-fruits-into-baskets-ii cpp
3678-design-task-manager cpp

Prefix Sum

1537-maximum-score-after-splitting-a-string cpp
1477-product-of-the-last-k-numbers js
1895-minimum-number-of-operations-to-move-all-balls-to-each-box cpp
2059-unique-length-3-palindromic-subsequences cpp
2145-grid-game cpp
2358-number-of-ways-to-split-array cpp
2465-shifting-letters-ii cpp
2529-range-product-queries-of-powers cpp
2691-count-vowel-strings-in-ranges cpp
3643-zero-array-transformation-ii cpp
3719-longest-balanced-subarray-i cpp
3794-find-the-minimum-amount-of-time-to-brew-potions cpp
2229-maximum-fruits-harvested-after-at-most-k-steps cpp
3640-maximum-frequency-of-an-element-after-performing-operations-ii cpp

Recursion

0231-power-of-two cpp
2050-count-good-numbers cpp

Rolling Hash

3309-count-prefix-and-suffix-pairs-i cpp

Segment Tree

3790-fruits-into-baskets-ii cpp
3719-longest-balanced-subarray-i cpp

Shortest Path

2090-number-of-ways-to-arrive-at-destination cpp
2976-minimum-cost-to-convert-string-i cpp
3650-minimum-cost-path-with-edge-reversals cpp
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid cpp
2977-minimum-cost-to-convert-string-ii cpp

Simulation

2274-keep-multiplying-found-values-by-two cpp
3379-transformed-array cpp
3447-clear-digits js
3790-fruits-into-baskets-ii cpp
0640-solve-the-equation cpp
2021-remove-all-occurrences-of-a-substring js
2265-partition-array-according-to-given-pivot js
3794-find-the-minimum-amount-of-time-to-brew-potions cpp

Sliding Window

1984-minimum-difference-between-highest-and-lowest-of-k-scores cpp
0940-fruit-into-baskets cpp
2478-longest-nice-subarray cpp
2498-smallest-subarrays-with-maximum-bitwise-or cpp
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii cpp
3634-minimum-removals-to-balance-array cpp
2229-maximum-fruits-harvested-after-at-most-k-steps cpp
3640-maximum-frequency-of-an-element-after-performing-operations-ii cpp

Sorting

1200-minimum-absolute-difference cpp
1984-minimum-difference-between-highest-and-lowest-of-k-scores cpp
2274-keep-multiplying-found-values-by-two cpp
3010-divide-an-array-into-subarrays-with-minimum-cost-i cpp
1877-minimize-maximum-pair-sum-in-array cpp
2473-max-sum-of-a-pair-with-equal-sum-of-digits cpp
2497-maximum-matching-of-players-with-trainers cpp
3219-make-lexicographically-smallest-array-by-swapping-elements cpp
3278-find-the-number-of-ways-to-place-people-i cpp
3430-count-days-without-meetings cpp
3634-minimum-removals-to-balance-array cpp
0759-set-intersection-size-at-least-two cpp
2141-maximum-running-time-of-n-computers cpp
2689-rearranging-fruits cpp
3640-maximum-frequency-of-an-element-after-performing-operations-ii cpp

Stack

3447-clear-digits js
1653-minimum-deletions-to-make-string-balanced cpp
1818-maximum-score-from-removing-substrings cpp
2021-remove-all-occurrences-of-a-substring js
2221-check-if-a-parentheses-string-can-be-valid cpp
2456-construct-smallest-number-from-di-string cpp

String

1524-string-matching-in-an-array cpp
1537-maximum-score-after-splitting-a-string cpp
1915-check-if-one-string-swap-can-make-strings-equal js
2292-counting-words-with-a-given-prefix cpp
3309-count-prefix-and-suffix-pairs-i cpp
3447-clear-digits js
0038-count-and-say cpp
0166-fraction-to-recurring-decimal cpp
0640-solve-the-equation cpp
0768-partition-labels cpp
0952-word-subsets cpp
1502-construct-k-palindrome-strings cpp
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n cpp
1653-minimum-deletions-to-make-string-balanced cpp
1818-maximum-score-from-removing-substrings cpp
1895-minimum-number-of-operations-to-move-all-balls-to-each-box cpp
2021-remove-all-occurrences-of-a-substring js
2059-unique-length-3-palindromic-subsequences cpp
2107-find-unique-binary-string cpp js
2220-find-all-possible-recipes-from-given-supplies cpp
2221-check-if-a-parentheses-string-can-be-valid cpp
2456-construct-smallest-number-from-di-string cpp
2465-shifting-letters-ii cpp
2691-count-vowel-strings-in-ranges cpp
2976-minimum-cost-to-convert-string-i cpp
3018-make-string-a-subsequence-using-cyclic-increments cpp
3455-minimum-length-of-string-after-operations cpp
3569-count-of-substrings-containing-every-vowel-and-k-consonants-ii cpp
2977-minimum-cost-to-convert-string-ii cpp

String Matching

1524-string-matching-in-an-array cpp
2292-counting-words-with-a-given-prefix cpp
3309-count-prefix-and-suffix-pairs-i cpp

Topological Sort

0820-find-eventual-safe-states cpp
1558-course-schedule-iv cpp
2090-number-of-ways-to-arrive-at-destination cpp
2220-find-all-possible-recipes-from-given-supplies cpp
2246-maximum-employees-to-be-invited-to-a-meeting cpp

Tree

0110-balanced-binary-tree cpp
1161-maximum-level-sum-of-a-binary-tree cpp
1218-lowest-common-ancestor-of-deepest-leaves cpp
1339-maximum-product-of-splitted-binary-tree cpp
1382-balance-a-binary-search-tree cpp

Trie

3309-count-prefix-and-suffix-pairs-i cpp
2977-minimum-cost-to-convert-string-ii cpp

Two Pointers

0768-partition-labels cpp
1877-minimize-maximum-pair-sum-in-array cpp
2265-partition-array-according-to-given-pivot js
2497-maximum-matching-of-players-with-trainers cpp
3018-make-string-a-subsequence-using-cyclic-increments cpp

Union Find

0684-redundant-connection cpp
1396-count-servers-that-communicate cpp
2764-maximum-number-of-fish-in-a-grid cpp
3219-make-lexicographically-smallest-array-by-swapping-elements cpp
0854-making-a-large-island cpp
2583-divide-nodes-into-the-maximum-number-of-groups cpp

About

Collection of LeetCode questions to ace the coding interview!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published