Skip to content

Nama21yo/NatnaelLeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NatnaelLeetCode

LeetCode Solutions Of Natnael

LeetCode Topics

Database

0175-combine-two-tables
0181-employees-earning-more-than-their-managers

Hash Table

0041-first-missing-positive
0560-subarray-sum-equals-k
0567-permutation-in-string
0599-minimum-index-sum-of-two-lists
0632-smallest-range-covering-elements-from-k-lists
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1147-flip-columns-for-maximum-number-of-equal-rows
1256-rank-transform-of-an-array
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1793-minimum-moves-to-make-array-complementary
2054-the-number-of-the-smallest-unoccupied-chair
2339-k-divisible-elements-subarrays
2356-largest-combination-with-bitwise-and-greater-than-zero
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill

String

0005-longest-palindromic-substring
0028-find-the-index-of-the-first-occurrence-in-a-string
0151-reverse-words-in-a-string
0567-permutation-in-string
0599-minimum-index-sum-of-two-lists
0812-rotate-string
0957-minimum-add-to-make-parentheses-valid
1197-parsing-a-boolean-expression
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1460-number-of-substrings-containing-all-three-characters
1537-maximum-score-after-splitting-a-string
1667-find-kth-bit-in-nth-binary-string
1880-largest-merge-of-two-strings
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2580-circular-sentence
2800-minimum-string-length-after-removing-substrings
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3195-separate-black-and-white-balls
3451-string-compression-iii

Sliding Window

0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1538-maximum-points-you-can-obtain-from-cards
1755-defuse-the-bomb
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2552-maximum-sum-of-distinct-subarrays-with-length-k
3380-shortest-subarray-with-or-at-least-k-ii
3522-find-the-power-of-k-size-subarrays-i

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0075-sort-colors
0151-reverse-words-in-a-string
0283-move-zeroes
0567-permutation-in-string
0581-shortest-unsorted-continuous-subarray
0941-sort-array-by-parity
1168-duplicate-zeros
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1880-largest-merge-of-two-strings
1923-sentence-similarity-iii
1972-rotating-the-box
2095-minimum-number-of-swaps-to-make-the-string-balanced
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill
2602-maximum-enemy-forts-that-can-be-captured
3195-separate-black-and-white-balls
3471-minimum-average-of-smallest-and-largest-elements

Dynamic Programming

0005-longest-palindromic-substring
0042-trapping-rain-water
0053-maximum-subarray

Array

0011-container-with-most-water
0027-remove-element
0041-first-missing-positive
0042-trapping-rain-water
0048-rotate-image
0053-maximum-subarray
0075-sort-colors
0084-largest-rectangle-in-histogram
0136-single-number
0204-count-primes
0215-kth-largest-element-in-an-array
0238-product-of-array-except-self
0240-search-a-2d-matrix-ii
0283-move-zeroes
0303-range-sum-query-immutable
0498-diagonal-traverse
0560-subarray-sum-equals-k
0581-shortest-unsorted-continuous-subarray
0599-minimum-index-sum-of-two-lists
0632-smallest-range-covering-elements-from-k-lists
0724-find-pivot-index
0907-koko-eating-bananas
0941-sort-array-by-parity
0966-binary-subarrays-with-sum
1002-maximum-width-ramp
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1147-flip-columns-for-maximum-number-of-equal-rows
1168-duplicate-zeros
1256-rank-transform-of-an-array
1370-count-number-of-nice-subarrays
1514-minimum-value-to-get-positive-step-by-step-sum
1538-maximum-points-you-can-obtain-from-cards
1620-check-if-array-pairs-are-divisible-by-k
1656-count-good-triplets
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1693-sum-of-all-odd-length-subarrays
1694-make-sum-divisible-by-p
1755-defuse-the-bomb
1787-sum-of-absolute-differences-in-a-sorted-array
1793-minimum-moves-to-make-array-complementary
1833-find-the-highest-altitude
1923-sentence-similarity-iii
1940-maximum-xor-for-each-query
1972-rotating-the-box
2054-the-number-of-the-smallest-unoccupied-chair
2102-find-the-middle-index-in-array
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2339-k-divisible-elements-subarrays
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2488-divide-intervals-into-minimum-number-of-groups
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2602-maximum-enemy-forts-that-can-be-captured
2616-maximal-score-after-applying-k-operations
2714-left-and-right-sum-differences
2716-prime-subtraction-operation
3291-find-if-array-can-be-sorted
3311-ant-on-the-boundary
3380-shortest-subarray-with-or-at-least-k-ii
3471-minimum-average-of-smallest-and-largest-elements
3522-find-the-power-of-k-size-subarrays-i

Prefix Sum

0238-product-of-array-except-self
0303-range-sum-query-immutable
0560-subarray-sum-equals-k
0724-find-pivot-index
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1514-minimum-value-to-get-positive-step-by-step-sum
1537-maximum-score-after-splitting-a-string
1538-maximum-points-you-can-obtain-from-cards
1693-sum-of-all-odd-length-subarrays
1694-make-sum-divisible-by-p
1787-sum-of-absolute-differences-in-a-sorted-array
1793-minimum-moves-to-make-array-complementary
1833-find-the-highest-altitude
1940-maximum-xor-for-each-query
2102-find-the-middle-index-in-array
2488-divide-intervals-into-minimum-number-of-groups
2714-left-and-right-sum-differences
3311-ant-on-the-boundary

Math

0048-rotate-image
0204-count-primes
0263-ugly-number
0670-maximum-swap
1370-count-number-of-nice-subarrays
1693-sum-of-all-odd-length-subarrays
1787-sum-of-absolute-differences-in-a-sorted-array
2716-prime-subtraction-operation

Binary Search

0240-search-a-2d-matrix-ii
0907-koko-eating-bananas
1046-max-consecutive-ones-iii
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2716-prime-subtraction-operation

Divide and Conquer

0053-maximum-subarray
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii

Matrix

0048-rotate-image
0240-search-a-2d-matrix-ii
0498-diagonal-traverse
1147-flip-columns-for-maximum-number-of-equal-rows
1972-rotating-the-box
2343-count-unguarded-cells-in-the-grid

Design

0303-range-sum-query-immutable

Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0581-shortest-unsorted-continuous-subarray
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1197-parsing-a-boolean-expression
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2095-minimum-number-of-swaps-to-make-the-string-balanced
2800-minimum-string-length-after-removing-substrings

Greedy

0011-container-with-most-water
0581-shortest-unsorted-continuous-subarray
0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0957-minimum-add-to-make-parentheses-valid
1304-longest-happy-string
1880-largest-merge-of-two-strings
2095-minimum-number-of-swaps-to-make-the-string-balanced
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2716-prime-subtraction-operation
3195-separate-black-and-white-balls

Sorting

0075-sort-colors
0215-kth-largest-element-in-an-array
0581-shortest-unsorted-continuous-subarray
0632-smallest-range-covering-elements-from-k-lists
0941-sort-array-by-parity
1256-rank-transform-of-an-array
2179-most-beautiful-item-for-each-query
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill
3291-find-if-array-can-be-sorted
3471-minimum-average-of-smallest-and-largest-elements

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0581-shortest-unsorted-continuous-subarray
1002-maximum-width-ramp
1679-shortest-subarray-to-be-removed-to-make-array-sorted

Simulation

0498-diagonal-traverse
1667-find-kth-bit-in-nth-binary-string
2343-count-unguarded-cells-in-the-grid
2800-minimum-string-length-after-removing-substrings
3311-ant-on-the-boundary

Enumeration

0204-count-primes
1656-count-good-triplets
2170-count-number-of-maximum-bitwise-or-subsets
2339-k-divisible-elements-subarrays

Number Theory

0204-count-primes
2716-prime-subtraction-operation

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0812-rotate-string

Trie

2339-k-divisible-elements-subarrays

Rolling Hash

2339-k-divisible-elements-subarrays

Hash Function

2339-k-divisible-elements-subarrays

Counting

1034-subarrays-with-k-different-integers
1620-check-if-array-pairs-are-divisible-by-k
2356-largest-combination-with-bitwise-and-greater-than-zero

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0632-smallest-range-covering-elements-from-k-lists
1304-longest-happy-string
2054-the-number-of-the-smallest-unoccupied-chair
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations

Quickselect

0215-kth-largest-element-in-an-array

Backtracking

2170-count-number-of-maximum-bitwise-or-subsets

Bit Manipulation

0136-single-number
1940-maximum-xor-for-each-query
2170-count-number-of-maximum-bitwise-or-subsets
2356-largest-combination-with-bitwise-and-greater-than-zero
3291-find-if-array-can-be-sorted
3380-shortest-subarray-with-or-at-least-k-ii

Recursion

1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string

About

LeetCode Solutions Of Natnael

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published