Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,187 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Array

0001-two-sum
0026-remove-duplicates-from-sorted-array
0035-search-insert-position
0066-plus-one
0075-sort-colors
0088-merge-sorted-array
0164-maximum-gap
0189-rotate-array
0198-house-robber
0204-count-primes
0217-contains-duplicate
0219-contains-duplicate-ii
0238-product-of-array-except-self
0268-missing-number
0414-third-maximum-number
0485-max-consecutive-ones
0503-next-greater-element-ii
0532-k-diff-pairs-in-an-array
0561-array-partition
0611-valid-triangle-number
0628-maximum-product-of-three-numbers
0682-baseball-game
0748-largest-number-at-least-twice-of-others
0896-monotonic-array
0958-sort-array-by-parity-ii
0977-squares-of-a-sorted-array
1019-squares-of-a-sorted-array
1137-height-checker
1210-mean-of-array-after-removing-some-elements
1241-decompress-run-length-encoded-list
1287-distance-between-bus-stops
1293-three-consecutive-odds
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1574-maximum-product-of-two-elements-in-an-array
1580-shuffle-the-array
1635-number-of-good-pairs
1651-shuffle-string
1656-count-good-triplets
1781-check-if-two-string-arrays-are-equivalent
1791-richest-customer-wealth
1833-find-the-highest-altitude
1839-decode-xored-array
1878-check-if-array-is-sorted-and-rotated
1938-minimum-operations-to-make-the-array-increasing
1944-truncate-sentence
1950-sign-of-the-product-of-an-array
1975-minimum-distance-to-the-target-element
2042-maximum-product-difference-between-two-pairs
2048-build-array-from-permutation
2058-concatenation-of-array
2093-check-if-string-is-a-prefix-of-array
2106-find-greatest-common-divisor-of-array
2114-maximum-number-of-words-found-in-sentences
2122-count-special-quadruplets
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2181-smallest-index-with-equal-value
2232-adding-spaces-to-a-string
2274-keep-multiplying-found-values-by-two
2292-counting-words-with-a-given-prefix
2502-sort-the-people
2542-average-value-of-even-numbers-that-are-divisible-by-three
2614-maximum-count-of-positive-integer-and-negative-integer
2624-difference-between-element-sum-and-digit-sum-of-an-array
2714-left-and-right-sum-differences
2756-buy-two-chocolates
2876-number-of-employees-who-met-the-target
2892-check-if-array-is-good
3194-find-words-containing-character
3206-find-common-elements-between-two-arrays
3226-minimum-number-game
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3397-find-the-integer-added-to-array-i
3429-special-array-i
3446-find-the-number-of-good-pairs-i
3471-minimum-average-of-smallest-and-largest-elements
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3515-find-if-digit-game-can-be-won
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3606-minimum-element-after-replacement-with-digit-sum

Stack

0503-next-greater-element-ii
0682-baseball-game
2128-reverse-prefix-of-word

Monotonic Stack

0503-next-greater-element-ii

Hash Table

0001-two-sum
0141-linked-list-cycle
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0268-missing-number
0389-find-the-difference
0532-k-diff-pairs-in-an-array
0782-jewels-and-stones
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs
1960-check-if-the-sentence-is-pangram
2122-count-special-quadruplets
2274-keep-multiplying-found-values-by-two
2502-sort-the-people
2892-check-if-array-is-good
3206-find-common-elements-between-two-arrays
3412-permutation-difference-between-two-strings
3446-find-the-number-of-good-pairs-i
3581-the-two-sneaky-numbers-of-digitville

Database

0175-combine-two-tables
0176-second-highest-salary
0181-employees-earning-more-than-their-managers
0183-customers-who-never-order
0196-delete-duplicate-emails
0197-rising-temperature
0577-employee-bonus
0584-find-customer-referee
0595-big-countries
0596-classes-more-than-5-students
0610-triangle-judgement
0619-biggest-single-number
0620-not-boring-movies
0626-exchange-seats
0627-swap-salary
1136-actors-and-directors-who-cooperated-at-least-three-times
1153-product-sales-analysis-i
1174-sales-analysis-iii
1245-user-activity-for-the-past-30-days-i
1258-article-views-i
1338-queries-quality-and-percentage
1415-students-and-examinations
1462-list-the-products-ordered-in-a-period
1509-replace-employee-id-with-the-unique-identifier
1664-find-users-with-valid-e-mails
1670-patients-with-a-condition
1724-customer-who-visited-but-did-not-make-any-transactions
1734-bank-account-summary-ii
1773-percentage-of-users-attended-a-contest
1811-fix-names-in-a-table
1827-invalid-tweets
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1892-find-total-time-spent-by-each-employee
1908-recyclable-and-low-fat-products
1942-primary-department-for-each-employee
2024-calculate-special-bonus
2041-the-latest-login-in-2020
2110-employees-with-missing-information
2127-employees-whose-manager-left-the-company
2495-number-of-unique-subjects-taught-by-each-teacher

Math

0050-powx-n
0066-plus-one
0172-factorial-trailing-zeroes
0189-rotate-array
0204-count-primes
0231-power-of-two
0258-add-digits
0268-missing-number
0326-power-of-three
0342-power-of-four
0343-integer-break
0357-count-numbers-with-unique-digits
0412-fizz-buzz
0504-base-7
0507-perfect-number
0628-maximum-product-of-three-numbers
1013-fibonacci-number
1236-n-th-tribonacci-number
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
1448-maximum-69-number
1610-xor-operation-in-an-array
1635-number-of-good-pairs
1806-count-of-matches-in-tournament
1950-sign-of-the-product-of-an-array
2106-find-greatest-common-divisor-of-array
2383-add-two-integers
2491-smallest-even-multiple
2507-number-of-common-factors
2542-average-value-of-even-numbers-that-are-divisible-by-three
2556-convert-the-temperature
2608-count-the-digits-that-divide-a-number
2624-difference-between-element-sum-and-digit-sum-of-an-array
2752-sum-multiples
2812-find-the-maximum-achievable-number
3172-divisible-and-non-divisible-sums-difference
3371-harshad-number
3450-find-the-child-who-has-the-ball-after-k-seconds
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3515-find-if-digit-game-can-be-won
3553-check-if-two-chessboard-squares-have-the-same-color
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3606-minimum-element-after-replacement-with-digit-sum

String

0058-length-of-last-word
0242-valid-anagram
0344-reverse-string
0389-find-the-difference
0392-is-subsequence
0412-fizz-buzz
0434-number-of-segments-in-a-string
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0742-to-lower-case
0782-jewels-and-stones
0812-rotate-string
1205-defanging-an-ip-address
1302-delete-characters-to-make-fancy-string
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1651-shuffle-string
1764-maximum-repeating-substring
1781-check-if-two-string-arrays-are-equivalent
1797-goal-parser-interpretation
1823-determine-if-string-halves-are-alike
1859-sorting-the-sentence
1894-merge-strings-alternately
1944-truncate-sentence
1960-check-if-the-sentence-is-pangram
2093-check-if-string-is-a-prefix-of-array
2114-maximum-number-of-words-found-in-sentences
2128-reverse-prefix-of-word
2137-final-value-of-variable-after-performing-operations
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2502-sort-the-people
2580-circular-sentence
3194-find-words-containing-character
3379-score-of-a-string
3412-permutation-difference-between-two-strings
3553-check-if-two-chessboard-squares-have-the-same-color
3636-check-balanced-string
3794-reverse-string-prefix

Counting

1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs
1823-determine-if-string-halves-are-alike
2614-maximum-count-of-positive-integer-and-negative-integer

Sorting

0075-sort-colors
0088-merge-sorted-array
0164-maximum-gap
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0389-find-the-difference
0414-third-maximum-number
0532-k-diff-pairs-in-an-array
0561-array-partition
0611-valid-triangle-number
0628-maximum-product-of-three-numbers
0748-largest-number-at-least-twice-of-others
0958-sort-array-by-parity-ii
0977-squares-of-a-sorted-array
1019-squares-of-a-sorted-array
1137-height-checker
1210-mean-of-array-after-removing-some-elements
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1574-maximum-product-of-two-elements-in-an-array
1859-sorting-the-sentence
2042-maximum-product-difference-between-two-pairs
2274-keep-multiplying-found-values-by-two
2502-sort-the-people
2756-buy-two-chocolates
2892-check-if-array-is-good
3226-minimum-number-game
3471-minimum-average-of-smallest-and-largest-elements

Prefix Sum

0238-product-of-array-except-self
1537-maximum-score-after-splitting-a-string
1833-find-the-highest-altitude
2714-left-and-right-sum-differences

Two Pointers

0026-remove-duplicates-from-sorted-array
0075-sort-colors
0088-merge-sorted-array
0141-linked-list-cycle
0189-rotate-array
0344-reverse-string
0392-is-subsequence
0532-k-diff-pairs-in-an-array
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0611-valid-triangle-number
0958-sort-array-by-parity-ii
0977-squares-of-a-sorted-array
1019-squares-of-a-sorted-array
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1894-merge-strings-alternately
2093-check-if-string-is-a-prefix-of-array
2128-reverse-prefix-of-word
2232-adding-spaces-to-a-string
3471-minimum-average-of-smallest-and-largest-elements
3794-reverse-string-prefix

Number Theory

0204-count-primes
0258-add-digits
2106-find-greatest-common-divisor-of-array
2491-smallest-even-multiple
2507-number-of-common-factors

Matrix

1791-richest-customer-wealth
2132-convert-1d-array-into-2d-array

Enumeration

0204-count-primes
1656-count-good-triplets
2122-count-special-quadruplets
2507-number-of-common-factors

Simulation

0258-add-digits
0412-fizz-buzz
0682-baseball-game
1806-count-of-matches-in-tournament
2048-build-array-from-permutation
2058-concatenation-of-array
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2232-adding-spaces-to-a-string
2274-keep-multiplying-found-values-by-two
3226-minimum-number-game
3450-find-the-child-who-has-the-ball-after-k-seconds
3555-final-array-state-after-k-multiplication-operations-i

Binary Search

0035-search-insert-position
0268-missing-number
0532-k-diff-pairs-in-an-array
0611-valid-triangle-number
1468-check-if-n-and-its-double-exist
2614-maximum-count-of-positive-integer-and-negative-integer

Bit Manipulation

0231-power-of-two
0268-missing-number
0342-power-of-four
0389-find-the-difference
1444-number-of-steps-to-reduce-a-number-to-zero
1610-xor-operation-in-an-array
1839-decode-xored-array

Dynamic Programming

0198-house-robber
0343-integer-break
0357-count-numbers-with-unique-digits
0392-is-subsequence
1013-fibonacci-number
1236-n-th-tribonacci-number
1764-maximum-repeating-substring

String Matching

0812-rotate-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1764-maximum-repeating-substring
2292-counting-words-with-a-given-prefix

Recursion

0021-merge-two-sorted-lists
0050-powx-n
0203-remove-linked-list-elements
0231-power-of-two
0326-power-of-three
0342-power-of-four
1013-fibonacci-number

Memoization

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

Bucket Sort

0164-maximum-gap

Radix Sort

0164-maximum-gap

Counting Sort

0561-array-partition
1137-height-checker

Greedy

0561-array-partition
0611-valid-triangle-number
1448-maximum-69-number
1938-minimum-operations-to-make-the-array-increasing
2756-buy-two-chocolates

Backtracking

0357-count-numbers-with-unique-digits

Heap (Priority Queue)

1574-maximum-product-of-two-elements-in-an-array
3226-minimum-number-game
3555-final-array-state-after-k-multiplication-operations-i

Linked List

0021-merge-two-sorted-lists
0083-remove-duplicates-from-sorted-list
0141-linked-list-cycle
0203-remove-linked-list-elements

Sliding Window

0219-contains-duplicate-ii

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages