A collection of JavaScript exercises and examples to help you master the fundamentals, including arrays, functions, ES6 features, and more. Whether you're a beginner or an intermediate learner, this repository is the perfect place to practice and improve your JavaScript skills! π
This repository contains a structured collection of JavaScript files categorized into:
- Array methods
- DSA problem-solving
- Web development concepts
Itβs ideal for learners, job interview prep, or anyone revising core JavaScript logic and data structures.
βββ Filter.js βββ Find-index-method.js βββ Find-max-min-value-in-array.js βββ Find-method.js βββ Flatten-Nested-Array.js βββ Map.js βββ Removing-Duplicate-from-array.js βββ Reverse-String.js βββ Sorting-Array.js βββ sum-all-element-array.js
βββ 0 - 1-Knapsack-Problem.js βββ Anagram.js βββ Array-Duplicates.js βββ Array-Leaders.js βββ Array-Search.js βββ Array-Subset.js βββ BFS-of-graph.js βββ Binary-Search.js βββ Check-Equal-Arrays.js βββ Check-for-BST.js βββ Common-in-3-Sorted-Arrays.js βββ Count-Digits.js βββ Count-Inversions.js βββ Detect-Loop-in-linked-list.js βββ Directed-Graph-Cycle.js βββ Equilibrium-Point.js βββ Floor-in-a-Sorted-Array.js βββ indexes-of-Subarray-Sum.js βββ K-Sized-Subarray-Maximum.js βββ Kadane's-Algorithm.js βββ Kth-from-End-of-Linked-List.js βββ Kth-Smallest.js βββ Largest-Element-in-Array.js βββ Largest-subarray-with-0-sum.js βββ Left-View-of-Binary-Tree.js βββ Longest-Subarray-with-Sum-K.js βββ Majority-Element.js βββ Maximum-Product-Subarray.js βββ Minimize-the-Heights.js βββ Minimum-Jumps.js βββ Minimum-Platforms.js βββ Missing-And-Repeating.js βββ missing-number.js βββ Next-Greater-Element.js βββ Palindrome-String.js βββ Parenthesis-Checker.js βββ Peak-element.js βββ Perfect-Sum-Problem.js βββ Power-of-2.js βββ Prime-Number.js βββ Remove-loop-in-Linked-List.js βββ Reverse-a-String.js βββ Reverse-Words.js βββ Rotate-Array.js βββ second-largest.js βββ Smallest-Positive-Missing.js βββ Sort.js βββ Subset-Sum-Problem.js βββ Sum-of-Natural-Numbers.js βββ Top-View-of-Binary-Tree.js βββ Trapping-Rain-Water.js βββ Tree-Boundary-Traversal.js βββ Two-Sum-Pair-with-Given-Sum.js βββ Two-sum-Pairs-with-0-Sum.js βββ Undirected-Graph-Cycle.js βββ Union-of-2-Sorted-with-Duplicates.js βββ Union-of-Arrays-with-Duplicates.js βββ Middle-of-a-Linked-List.js βββ Frequencies-in-a-Limited-Array.js βββ Longest-Consecutive-Subsequence.js βββ Move-All-Zeroes-to-End.js βββ Palindrome-Linked-List.js βββ Min-and-Max-in-Array.js βββ Nth-Fibonacci-Number.js βββ Sorted-Array-Search.js βββ Rat-in-a-Maze-Problem-I.js βββ DFS-of-Graph.js βββ Linked-List-Insertion-At-End.js βββ K-th-element-of-two-Arrays.js βββ Reverse-a-linked-list.js βββ N-meetings-in-one-room.js βββ Reverse-array-in-groups.js βββ Fractional-Knapsack.js βββ Row-with-max-1s.js βββ Add-Number-Linked-Lists.js βββ Number-of-occurrence.js βββ Longest-Increasing-Subsequence.js βββ Diameter-of-a-Binary-Tree.js βββ Power-of-number.js βββ nCr.js βββ Find-triplets-with-zero-sum.js βββ The-Celebrity-Problem.js
βββ Async-Await.js βββ Callback.js βββ Closure.js βββ Hoisting.js βββ IIFE.js βββ Promises.js βββ scope.js
Add these to help others find the repo via search and boost GitHub visibility:
- JavaScript Array Methods (map, filter, reduce, sort, etc.)
- DSA in JavaScript: Arrays, Strings, Trees, Graphs
- JS Interview Preparation (functions, closures, hoisting, async/await)
- Binary Search, Dynamic Programming, Sliding Window, Recursion
- Web development JavaScript concepts
- Pure JS problem solving with real interview questions
- Clone the repository:
git clone https://github.com/yourusername/javascript-practice-code.git
- Navigate to the project folder:
cd javascript-practice-code
- Explore the files and run the code!
Want to add your own solutions or improvements? Contributions are welcome! Feel free to fork the repo, make changes, and submit a pull request.