Skip to content

Amanp30/javascript-leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript LeetCode Solutions

This repository contains solutions to 100+ LeetCode problems written in JavaScript.
Each problem is solved in multiple ways — from brute force to optimized techniques.
The goal is to demonstrate different approaches and help improve problem-solving skills.

All solutions have been tested using a custom script. Most of them should work correctly,
though there may be occasional breakages depending on edge cases or updates on LeetCode's platform.

📚 I also write about Node.js, backend development, and JavaScript on my blog:
👉 https://amanpareek.in

🛠️ You can also check out my other projects here:
👉 https://amanpareek.in/projects.html

🚫 This project does not currently accept external contributions, as all content is generated dynamically from a MongoDB database.

📄 Problem List (110 problems)

# Title Link
1 Check if Grid Satisfies Conditions Link
2 Detect Capital Link
3 Get first positive integer in array Link
4 Additive Number Link
5 Array Partition Link
6 Array of strings containing numbers Link
7 Can Place Flowers Link
8 Check if a String Contains Only Digits Link
9 Check if a String Contains Only Uppercase Letters Link
10 Check if a String is a Palindrome Link
11 Check if an Array is Sorted Link
12 Climbing Stairs Link
13 Contains Duplicate II Link
14 Contains Duplicate elements in array Link
15 Contiguous Array Link
16 Convert String to Title Case Link
17 Count Anagrams Link
18 Count Complete Substrings Link
19 Count Number of Vowels in a String Link
20 Count and Say Link
21 Count primes Link
22 Count the Number of Special Characters I Link
23 Defuse the Bomb Link
24 Degree of an Array Link
25 Distribute Candies Link
26 Extract phone numbers from a block of text Link
27 Extract version numbers from strings Link
28 Factorial of a number Link
29 Fibonacci Number Link
30 Find Length of the Last Word Link
31 Find Smallest Letter Greater Than Target Link
32 Find Winner on a Tic Tac Toe Game Link
33 Find and Remove element from array Link
34 Find second smallest and second largest element in array Link
35 Find the First Unique Character in a String Link
36 Find the Longest Word in a Sentence Link
37 Find the largest number in array Link
38 Finding the Resultant Array After Removing Anagrams Link
39 Flatten array Link
40 Generate Fibonacci Sequence Link
41 Generate Parentheses Link
42 Group Anagrams Link
43 Integer to Roman Link
44 Intersection of Two Arrays Link
45 Intersection of Two Arrays II Link
46 Is array equal Link
47 Isomorphic Strings Link
48 Largest 3-Same-Digit Number in String Link
49 Largest Odd Number in String Link
50 Leaders in an Array Link
51 Left Rotate Array in JavaScript Link
52 Length of the Longest Palindrome Link
53 Longest Common Prefix Link
54 Longest Harmonious Subsequence Link
55 Longest Palindromic Substring Link
56 Longest Substring with At Least K Repeating Characters Link
57 Longest Valid Parentheses Link
58 Majority Element Link
59 Match hex color codes Link
60 Max Consecutive Ones Link
61 Maximal Square Link
62 Maximal rectangle Link
63 Maximum Average Subarray I Link
64 Maximum Product Subarray Link
65 Maximum Product of Three Numbers Link
66 Maximum Product of Word Lengths Link
67 Maximum Score From Removing Substrings Link
68 Maximum Subarray Sum Link
69 Maximum Sum Circular Subarray Link
70 Min Cost Climbing Stairs Link
71 Minimum Cost of Buying Candies With Discount Link
72 Minimum Index Sum of Two Lists Link
73 Move All Zeros to the End of an Array Link
74 Multiply Strings Link
75 Number of Students Unable to Eat Lunch Link
76 Number of Substrings Containing All Three Characters Link
77 Pascal's Triangle Link
78 Pascal's Triangle II Link
79 Path with Maximum Gold Link
80 Plus One Link
81 Product of array except self Link
82 Relative Ranks Link
83 Remove All Falsy Values from an Array Link
84 Remove Duplicate Letters Link
85 Remove Outermost Parentheses Link
86 Remove the Last Element from an Array Link
87 Replace Words Link
88 Reverse Every Word in a String Link
89 Reverse String Link
90 Reverse Vowels of a String Link
91 Reverse the Odd-Length Words in a String Link
92 Reverse words in a string Link
93 Right Rotate Array in JavaScript Link
94 Roman to Integer Link
95 Search Insert Position Link
96 Set Matrix Zeroes Link
97 Shortest Palindrome Link
98 Single Number Link
99 Sort Characters By Frequency Link
100 Sort Colors Link
101 Split a String into a Fibonacci Sequence Link
102 Sum of Digits Link
103 Three Consecutive Odds Link
104 Time Needed to Buy Tickets Link
105 Two Sum Link
106 Union of Two Sorted Arrays Link
107 Valid Anagram Link
108 Validate Email Address Link
109 Word Pattern Link
110 check whether one string is a rotation of another Link

📄 License

This project is licensed under the MIT License – see the LICENSE file for details.

About

110 JavaScript leetcode solutions with different approaches

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published