|
| 1 | +# JavaScript LeetCode Solutions |
| 2 | + |
| 3 | +This repository contains solutions to 100+ LeetCode problems written in **JavaScript**. |
| 4 | +Each problem is solved in multiple ways — from brute force to optimized techniques. |
| 5 | +The goal is to demonstrate different approaches and help improve problem-solving skills. |
| 6 | + |
| 7 | +All solutions have been tested using a custom script. Most of them should work correctly, |
| 8 | +though there may be occasional breakages depending on edge cases or updates on LeetCode's platform. |
| 9 | + |
| 10 | +> 🚫 This project does not currently accept external contributions, as all content is generated dynamically from a MongoDB database. |
| 11 | + |
| 12 | + |
| 13 | +## 📄 Problem List (110 problems) |
| 14 | + |
| 15 | +| # | Title | Link | |
| 16 | +|---|-------|------| |
| 17 | +| 1 | Check if Grid Satisfies Conditions | [Link](./solutions/check-if-grid-satisfies-conditions) | |
| 18 | +| 2 | Detect Capital | [Link](./solutions/detect-capital) | |
| 19 | +| 3 | Get first positive integer in array | [Link](./solutions/first-positive-integer-in-array) | |
| 20 | +| 4 | Additive Number | [Link](./solutions/additive-number) | |
| 21 | +| 5 | Array Partition | [Link](./solutions/array-partition) | |
| 22 | +| 6 | Array of strings containing numbers | [Link](./solutions/array-of-strings-containing-numbers) | |
| 23 | +| 7 | Can Place Flowers | [Link](./solutions/can-place-flowers) | |
| 24 | +| 8 | Check if a String Contains Only Digits | [Link](./solutions/check-if-a-string-contains-only-digits) | |
| 25 | +| 9 | Check if a String Contains Only Uppercase Letters | [Link](./solutions/check-if-a-string-contains-only-uppercase-letters) | |
| 26 | +| 10 | Check if a String is a Palindrome | [Link](./solutions/check-if-a-string-is-a-palindrome) | |
| 27 | +| 11 | Check if an Array is Sorted | [Link](./solutions/check-if-an-array-is-sorted) | |
| 28 | +| 12 | Climbing Stairs | [Link](./solutions/climbing-stairs) | |
| 29 | +| 13 | Contains Duplicate II | [Link](./solutions/contains-duplicate-ii) | |
| 30 | +| 14 | Contains Duplicate elements in array | [Link](./solutions/contains-duplicate-elements-in-array) | |
| 31 | +| 15 | Contiguous Array | [Link](./solutions/contiguous-array) | |
| 32 | +| 16 | Convert String to Title Case | [Link](./solutions/convert-string-to-title-case) | |
| 33 | +| 17 | Count Anagrams | [Link](./solutions/count-anagrams) | |
| 34 | +| 18 | Count Complete Substrings | [Link](./solutions/count-complete-substrings) | |
| 35 | +| 19 | Count Number of Vowels in a String | [Link](./solutions/count-number-of-vowels-in-a-string) | |
| 36 | +| 20 | Count and Say | [Link](./solutions/count-and-say) | |
| 37 | +| 21 | Count primes | [Link](./solutions/count-primes) | |
| 38 | +| 22 | Count the Number of Special Characters I | [Link](./solutions/count-the-number-of-special-characters-i) | |
| 39 | +| 23 | Defuse the Bomb | [Link](./solutions/defuse-the-bomb) | |
| 40 | +| 24 | Degree of an Array | [Link](./solutions/degree-of-an-array) | |
| 41 | +| 25 | Distribute Candies | [Link](./solutions/distribute-candies) | |
| 42 | +| 26 | Extract phone numbers from a block of text | [Link](./solutions/extract-phone-numbers-from-a-block-of-text) | |
| 43 | +| 27 | Extract version numbers from strings | [Link](./solutions/extract-version-numbers-from-strings) | |
| 44 | +| 28 | Factorial of a number | [Link](./solutions/factorial-of-a-number) | |
| 45 | +| 29 | Fibonacci Number | [Link](./solutions/fibonacci-number) | |
| 46 | +| 30 | Find Length of the Last Word | [Link](./solutions/find-length-of-the-last-word) | |
| 47 | +| 31 | Find Smallest Letter Greater Than Target | [Link](./solutions/find-smallest-letter-greater-than-target) | |
| 48 | +| 32 | Find Winner on a Tic Tac Toe Game | [Link](./solutions/find-winner-on-a-tic-tac-toe-game) | |
| 49 | +| 33 | Find and Remove element from array | [Link](./solutions/find-and-remove-element-from-array) | |
| 50 | +| 34 | Find second smallest and second largest element in array | [Link](./solutions/find-second-smallest-and-second-largest-element-in-array) | |
| 51 | +| 35 | Find the First Unique Character in a String | [Link](./solutions/first-unique-character-in-a-string) | |
| 52 | +| 36 | Find the Longest Word in a Sentence | [Link](./solutions/find-the-longest-word-in-a-sentence) | |
| 53 | +| 37 | Find the largest number in array | [Link](./solutions/find-the-largest-number-in-array) | |
| 54 | +| 38 | Finding the Resultant Array After Removing Anagrams | [Link](./solutions/finding-the-resultant-array-after-removing-anagrams) | |
| 55 | +| 39 | Flatten array | [Link](./solutions/flat-array) | |
| 56 | +| 40 | Generate Fibonacci Sequence | [Link](./solutions/generate-fibonacci-sequence) | |
| 57 | +| 41 | Generate Parentheses | [Link](./solutions/generate-parentheses) | |
| 58 | +| 42 | Group Anagrams | [Link](./solutions/group-anagrams) | |
| 59 | +| 43 | Integer to Roman | [Link](./solutions/integer-to-roman) | |
| 60 | +| 44 | Intersection of Two Arrays | [Link](./solutions/intersection-of-two-arrays) | |
| 61 | +| 45 | Intersection of Two Arrays II | [Link](./solutions/intersection-of-two-arrays-ii) | |
| 62 | +| 46 | Is array equal | [Link](./solutions/is-two-array-equal) | |
| 63 | +| 47 | Isomorphic Strings | [Link](./solutions/isomorphic-strings) | |
| 64 | +| 48 | Largest 3-Same-Digit Number in String | [Link](./solutions/largest-3-same-digit-number-in-string) | |
| 65 | +| 49 | Largest Odd Number in String | [Link](./solutions/largest-odd-number-in-string) | |
| 66 | +| 50 | Leaders in an Array | [Link](./solutions/leaders-in-an-array) | |
| 67 | +| 51 | Left Rotate Array in JavaScript | [Link](./solutions/left-rotate-array) | |
| 68 | +| 52 | Length of the Longest Palindrome | [Link](./solutions/length-of-the-longest-palindrome) | |
| 69 | +| 53 | Longest Common Prefix | [Link](./solutions/longest-common-prefix) | |
| 70 | +| 54 | Longest Harmonious Subsequence | [Link](./solutions/longest-harmonious-subsequence) | |
| 71 | +| 55 | Longest Palindromic Substring | [Link](./solutions/longest-palindromic-substring) | |
| 72 | +| 56 | Longest Substring with At Least K Repeating Characters | [Link](./solutions/longest-substring-with-at-least-k-repeating-characters) | |
| 73 | +| 57 | Longest Valid Parentheses | [Link](./solutions/longest-valid-parentheses) | |
| 74 | +| 58 | Majority Element | [Link](./solutions/majority-element) | |
| 75 | +| 59 | Match hex color codes | [Link](./solutions/match-hex-color-codes) | |
| 76 | +| 60 | Max Consecutive Ones | [Link](./solutions/max-consecutive-ones) | |
| 77 | +| 61 | Maximal Square | [Link](./solutions/maximal-square) | |
| 78 | +| 62 | Maximal rectangle | [Link](./solutions/maximal-rectangle) | |
| 79 | +| 63 | Maximum Average Subarray I | [Link](./solutions/maximum-average-subarray-i) | |
| 80 | +| 64 | Maximum Product Subarray | [Link](./solutions/maximum-product-subarray) | |
| 81 | +| 65 | Maximum Product of Three Numbers | [Link](./solutions/maximum-product-of-three-numbers) | |
| 82 | +| 66 | Maximum Product of Word Lengths | [Link](./solutions/maximum-product-of-word-lengths) | |
| 83 | +| 67 | Maximum Score From Removing Substrings | [Link](./solutions/maximum-score-from-removing-substrings) | |
| 84 | +| 68 | Maximum Subarray Sum | [Link](./solutions/maximum-subarray-sum) | |
| 85 | +| 69 | Maximum Sum Circular Subarray | [Link](./solutions/maximum-sum-circular-subarray) | |
| 86 | +| 70 | Min Cost Climbing Stairs | [Link](./solutions/min-cost-climbing-stairs) | |
| 87 | +| 71 | Minimum Cost of Buying Candies With Discount | [Link](./solutions/minimum-cost-of-buying-candies-with-discount) | |
| 88 | +| 72 | Minimum Index Sum of Two Lists | [Link](./solutions/minimum-index-sum-of-two-lists) | |
| 89 | +| 73 | Move All Zeros to the End of an Array | [Link](./solutions/move-all-zeros-to-the-end-of-an-array) | |
| 90 | +| 74 | Multiply Strings | [Link](./solutions/multiply-strings) | |
| 91 | +| 75 | Number of Students Unable to Eat Lunch | [Link](./solutions/number-of-students-unable-to-eat-lunch) | |
| 92 | +| 76 | Number of Substrings Containing All Three Characters | [Link](./solutions/number-of-substrings-containing-all-three-characters) | |
| 93 | +| 77 | Pascal's Triangle | [Link](./solutions/pascals-triangle) | |
| 94 | +| 78 | Pascal's Triangle II | [Link](./solutions/pascals-triangle-ii) | |
| 95 | +| 79 | Path with Maximum Gold | [Link](./solutions/path-with-maximum-gold) | |
| 96 | +| 80 | Plus One | [Link](./solutions/plus-one) | |
| 97 | +| 81 | Product of array except self | [Link](./solutions/product-of-array-except-self) | |
| 98 | +| 82 | Relative Ranks | [Link](./solutions/relative-ranks) | |
| 99 | +| 83 | Remove All Falsy Values from an Array | [Link](./solutions/remove-all-falsy-values-from-an-array) | |
| 100 | +| 84 | Remove Duplicate Letters | [Link](./solutions/remove-duplicate-letters) | |
| 101 | +| 85 | Remove Outermost Parentheses | [Link](./solutions/remove-outermost-parentheses) | |
| 102 | +| 86 | Remove the Last Element from an Array | [Link](./solutions/remove-the-last-element-from-an-array) | |
| 103 | +| 87 | Replace Words | [Link](./solutions/replace-words) | |
| 104 | +| 88 | Reverse Every Word in a String | [Link](./solutions/reverse-every-word-in-a-string) | |
| 105 | +| 89 | Reverse String | [Link](./solutions/reverse-string) | |
| 106 | +| 90 | Reverse Vowels of a String | [Link](./solutions/reverse-vowels-of-a-string) | |
| 107 | +| 91 | Reverse the Odd-Length Words in a String | [Link](./solutions/reverse-the-odd-length-words-in-a-string) | |
| 108 | +| 92 | Reverse words in a string | [Link](./solutions/reverse-words-in-a-string) | |
| 109 | +| 93 | Right Rotate Array in JavaScript | [Link](./solutions/right-rotate-array-in-javascript) | |
| 110 | +| 94 | Roman to Integer | [Link](./solutions/roman-to-integer) | |
| 111 | +| 95 | Search Insert Position | [Link](./solutions/search-insert-position) | |
| 112 | +| 96 | Set Matrix Zeroes | [Link](./solutions/set-matrix-zeroes) | |
| 113 | +| 97 | Shortest Palindrome | [Link](./solutions/shortest-palindrome) | |
| 114 | +| 98 | Single Number | [Link](./solutions/single-number) | |
| 115 | +| 99 | Sort Characters By Frequency | [Link](./solutions/sort-characters-by-frequency-leetcode) | |
| 116 | +| 100 | Sort Colors | [Link](./solutions/sort-colors) | |
| 117 | +| 101 | Split a String into a Fibonacci Sequence | [Link](./solutions/split-a-string-into-a-fibonacci-sequence) | |
| 118 | +| 102 | Sum of Digits | [Link](./solutions/sum-of-digits) | |
| 119 | +| 103 | Three Consecutive Odds | [Link](./solutions/three-consecutive-odds) | |
| 120 | +| 104 | Time Needed to Buy Tickets | [Link](./solutions/time-needed-to-buy-tickets) | |
| 121 | +| 105 | Two Sum | [Link](./solutions/two-sum) | |
| 122 | +| 106 | Union of Two Sorted Arrays | [Link](./solutions/union-of-two-sorted-arrays) | |
| 123 | +| 107 | Valid Anagram | [Link](./solutions/valid-anagram) | |
| 124 | +| 108 | Validate Email Address | [Link](./solutions/regex-validate-email-addresses) | |
| 125 | +| 109 | Word Pattern | [Link](./solutions/word-pattern) | |
| 126 | +| 110 | check whether one string is a rotation of another | [Link](./solutions/check-one-string-is-rotation-of-another) | |
| 127 | + |
| 128 | + |
| 129 | +## 📄 License |
| 130 | + |
| 131 | +This project is licensed under the MIT License – see the [LICENSE](./LICENSE) file for details. |
0 commit comments