Skip to content

A repository for all my Leet code problem solutions written in JavaScript. Includes a variety of coding challenges with efficient solutions, covering arrays, strings, algorithms, and data structures.

Notifications You must be signed in to change notification settings

C00LPIXER/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Math

0002-add-two-numbers
0007-reverse-integer
0009-palindrome-number
0066-plus-one
0067-add-binary
0070-climbing-stairs
0189-rotate-array
0231-power-of-two
0504-base-7
0628-maximum-product-of-three-numbers
1013-fibonacci-number
1421-find-numbers-with-even-number-of-digits
1920-determine-color-of-a-chessboard-square
2383-add-two-integers
3371-harshad-number
3515-find-if-digit-game-can-be-won
3555-final-array-state-after-k-multiplication-operations-i
3606-minimum-element-after-replacement-with-digit-sum

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0014-longest-common-prefix
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0032-longest-valid-parentheses
0058-length-of-last-word
0067-add-binary
0125-valid-palindrome
0242-valid-anagram
0344-reverse-string
0434-number-of-segments-in-a-string
0837-most-common-word
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1720-crawler-log-folder
1894-merge-strings-alternately
1899-count-items-matching-a-rule
1920-determine-color-of-a-chessboard-square
2219-maximum-number-of-words-found-in-sentences
2232-adding-spaces-to-a-string
2300-construct-string-with-repeat-limit
2414-move-pieces-to-obtain-a-string
2502-sort-the-people
2727-number-of-senior-citizens
3018-make-string-a-subsequence-using-cyclic-increments
3636-check-balanced-string

Stack

0020-valid-parentheses
0032-longest-valid-parentheses
0094-binary-tree-inorder-traversal
0234-palindrome-linked-list
0682-baseball-game
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1720-crawler-log-folder

Array

0004-median-of-two-sorted-arrays
0026-remove-duplicates-from-sorted-array
0027-remove-element
0053-maximum-subarray
0066-plus-one
0075-sort-colors
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0217-contains-duplicate
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0448-find-all-numbers-disappeared-in-an-array
0485-max-consecutive-ones
0628-maximum-product-of-three-numbers
0682-baseball-game
0792-binary-search
0837-most-common-word
0860-design-circular-queue
0861-flipping-an-image
0948-sort-an-array
0958-sort-array-by-parity-ii
1127-last-stone-weight
1210-mean-of-array-after-removing-some-elements
1421-find-numbers-with-even-number-of-digits
1468-check-if-n-and-its-double-exist
1603-running-sum-of-1d-array
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1720-crawler-log-folder
1755-defuse-the-bomb
1886-minimum-limit-of-balls-in-a-bag
1899-count-items-matching-a-rule
2042-maximum-product-difference-between-two-pairs
2048-build-array-from-permutation
2181-smallest-index-with-equal-value
2219-maximum-number-of-words-found-in-sentences
2232-adding-spaces-to-a-string
2277-count-equal-and-divisible-pairs-in-an-array
2358-number-of-ways-to-split-array
2502-sort-the-people
2533-bitwise-xor-of-all-pairings
2692-take-gifts-from-the-richest-pile
2727-number-of-senior-citizens
2767-maximum-sum-with-exactly-k-elements
2777-find-the-distinct-difference-array
2836-neither-minimum-nor-maximum
3220-count-tested-devices-after-test-operations
3242-count-elements-with-maximum-frequency
3251-maximum-area-of-longest-diagonal-rectangle
3421-count-pairs-that-form-a-complete-day-i
3429-special-array-i
3515-find-if-digit-game-can-be-won
3555-final-array-state-after-k-multiplication-operations-i
3606-minimum-element-after-replacement-with-digit-sum

Simulation

0067-add-binary
0682-baseball-game
0861-flipping-an-image
2048-build-array-from-permutation
2232-adding-spaces-to-a-string
2692-take-gifts-from-the-richest-pile
3220-count-tested-devices-after-test-operations
3555-final-array-state-after-k-multiplication-operations-i

Two Pointers

0005-longest-palindromic-substring
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0075-sort-colors
0125-valid-palindrome
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
0287-find-the-duplicate-number
0344-reverse-string
0349-intersection-of-two-arrays
0861-flipping-an-image
0958-sort-array-by-parity-ii
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1894-merge-strings-alternately
2232-adding-spaces-to-a-string
2414-move-pieces-to-obtain-a-string
3018-make-string-a-subsequence-using-cyclic-increments

Binary Search

0004-median-of-two-sorted-arrays
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0792-binary-search
1468-check-if-n-and-its-double-exist
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1886-minimum-limit-of-balls-in-a-bag

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0948-sort-an-array

Hash Table

0003-longest-substring-without-repeating-characters
0217-contains-duplicate
0242-valid-anagram
0349-intersection-of-two-arrays
0448-find-all-numbers-disappeared-in-an-array
0837-most-common-word
1468-check-if-n-and-its-double-exist
2300-construct-string-with-repeat-limit
2502-sort-the-people
2777-find-the-distinct-difference-array
3242-count-elements-with-maximum-frequency
3421-count-pairs-that-form-a-complete-day-i

Counting

0837-most-common-word
2300-construct-string-with-repeat-limit
3220-count-tested-devices-after-test-operations
3242-count-elements-with-maximum-frequency
3421-count-pairs-that-form-a-complete-day-i

Sorting

0075-sort-colors
0217-contains-duplicate
0242-valid-anagram
0349-intersection-of-two-arrays
0628-maximum-product-of-three-numbers
0948-sort-an-array
0958-sort-array-by-parity-ii
1210-mean-of-array-after-removing-some-elements
1468-check-if-n-and-its-double-exist
2042-maximum-product-difference-between-two-pairs
2502-sort-the-people
2836-neither-minimum-nor-maximum

Monotonic Stack

1679-shortest-subarray-to-be-removed-to-make-array-sorted

Sliding Window

0003-longest-substring-without-repeating-characters
1755-defuse-the-bomb

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence

Bit Manipulation

0067-add-binary
0231-power-of-two
0287-find-the-duplicate-number
0861-flipping-an-image
2533-bitwise-xor-of-all-pairings

Dynamic Programming

0005-longest-palindromic-substring
0032-longest-valid-parentheses
0053-maximum-subarray
0070-climbing-stairs
1013-fibonacci-number

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
1013-fibonacci-number

Memoization

0070-climbing-stairs
1013-fibonacci-number

Prefix Sum

1537-maximum-score-after-splitting-a-string
1603-running-sum-of-1d-array
2358-number-of-ways-to-split-array

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0838-design-linked-list
0860-design-circular-queue

Trie

0014-longest-common-prefix

Heap (Priority Queue)

0789-kth-largest-element-in-a-stream
0948-sort-an-array
1127-last-stone-weight
2300-construct-string-with-repeat-limit
2692-take-gifts-from-the-richest-pile
3555-final-array-state-after-k-multiplication-operations-i

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array

Design

0789-kth-largest-element-in-a-stream
0838-design-linked-list
0860-design-circular-queue

Queue

0860-design-circular-queue

Greedy

2300-construct-string-with-repeat-limit
2767-maximum-sum-with-exactly-k-elements

Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0230-kth-smallest-element-in-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0230-kth-smallest-element-in-a-bst

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0230-kth-smallest-element-in-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream

Binary Search Tree

0230-kth-smallest-element-in-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream

Data Stream

0789-kth-largest-element-in-a-stream

Database

0183-customers-who-never-order

Brainteaser

2533-bitwise-xor-of-all-pairings

Matrix

0861-flipping-an-image

About

A repository for all my Leet code problem solutions written in JavaScript. Includes a variety of coding challenges with efficient solutions, covering arrays, strings, algorithms, and data structures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published