A daily practice repository for mastering Data Structures and Algorithms using modern JavaScript. Built on the philosophy of consistent progress over perfection โ solving 1-2 problems daily to build strong foundations and problem-solving confidence.
"It's not about rushing โ it's about showing up daily and solving with clarity. One problem at a time. One level up each day."
- ๐ Daily Consistency - Regular practice builds lasting skills
- ๐ Fundamentals First - Strong basics before advanced patterns
- ๐ง Deep Understanding - Clarity over speed, comprehension over completion
- โก Modern JavaScript - ES6+ features for clean, concise solutions
- ๐ Complexity Awareness - Understanding time and space trade-offs
| Structure | Status | Key Concepts |
|---|---|---|
| Arrays & Strings | ๐ In Progress | Manipulation, traversal, substring problems |
| Linked Lists | ๐ Planned | Singly/doubly linked, operations, pointers |
| Stacks & Queues | ๐ Planned | LIFO/FIFO operations, applications |
| Hash Maps & Sets | ๐ Planned | O(1) lookups, frequency counting |
| Structure | Status | Key Concepts |
|---|---|---|
| Trees & Graphs | ๐ Planned | Binary trees, BST, BFS, DFS |
| Heaps | ๐ Planned | Priority queues, heap operations |
| Pattern | Status | Key Concepts |
|---|---|---|
| Recursion & Backtracking | ๐ Planned | Base cases, call stack, decision trees |
| Sorting & Searching | ๐ Planned | Binary search, merge sort, quick sort |
| Two Pointers | ๐ Planned | Left-right, fast-slow pointer techniques |
| Sliding Window | ๐ Planned | Fixed/variable window, optimization |
| Prefix Sum | ๐ Planned | Cumulative sums, range queries |
- Modern JavaScript - ES6+ syntax (arrow functions, destructuring, template literals)
- Clean Code - Descriptive naming, logical structure, minimal complexity
- Comprehensive Comments - Algorithm explanation, complexity analysis
- Test Cases - Multiple scenarios including edge cases
- Performance Focus - Time and space complexity documentation
JavaScript-DSA/
โโโ 01-Arrays-Strings/
โ โโโ easy/
โ โ โโโ two-sum.js
โ โ โโโ reverse-string.js
โ โ โโโ valid-palindrome.js
โ โโโ medium/
โ โ โโโ longest-substring.js
โ โ โโโ three-sum.js
โ โโโ README.md
โโโ 02-Linked-Lists/
โ โโโ implementation/
โ โ โโโ singly-linked-list.js
โ โ โโโ doubly-linked-list.js
โ โโโ problems/
โ โ โโโ reverse-linked-list.js
โ โ โโโ merge-sorted-lists.js
โ โโโ README.md
โโโ 03-Stacks-Queues/
โโโ 04-Trees-Graphs/
โโโ 05-Recursion-Backtracking/
โโโ 06-Sorting-Searching/
โโโ 07-Algorithm-Patterns/
โโโ utils/
โ โโโ test-helpers.js
โ โโโ complexity-analyzer.js
โโโ README.md
- Node.js (v16 or higher)
- Basic JavaScript knowledge
- Problem-solving mindset
-
Clone the repository
git clone https://github.com/sh1v-max/JavaScript-DSA.git cd JavaScript-DSA -
Run any solution
# Example: Run a specific problem node 01-Arrays-Strings/easy/two-sum.js # Run with test cases node 01-Arrays-Strings/easy/two-sum.js --test -
Explore and practice
- Each folder contains problems organized by difficulty
- Solutions include detailed comments and complexity analysis
- Test cases provided for verification
/**
* Problem: Two Sum
* Difficulty: Easy
* Time Complexity: O(n)
* Space Complexity: O(n)
*
* Approach: Hash map for O(1) complement lookup
*
* @param {number[]} nums - Array of integers
* @param {number} target - Target sum
* @returns {number[]} Indices of two numbers that sum to target
*/
function twoSum(nums, target) {
const numMap = new Map();
for (let i = 0; i < nums.length; i++) {
const complement = target - nums[i];
if (numMap.has(complement)) {
return [numMap.get(complement), i];
}
numMap.set(nums[i], i);
}
return []; // No solution found
}
// Test Cases
const testCases = [
{ nums: , target: 9, expected: },[1][2][3][4]
{ nums: , target: 6, expected: },[1][2][5][6]
{ nums: , target: 6, expected: }[5][1]
];
// Run tests
testCases.forEach((test, index) => {
const result = twoSum(test.nums, test.target);
console.log(`Test ${index + 1}: ${JSON.stringify(result)} ${
JSON.stringify(result) === JSON.stringify(test.expected) ? 'โ
' : 'โ'
}`);
});
- ๐ Problems Solved: Growing daily
- ๐ฏ Current Focus: Arrays and Strings fundamentals
- โฑ๏ธ Daily Goal: 1-2 problems with deep understanding
- ๐ง Complexity Analysis: Time and space for every solution
- Foundation Phase - Master basic data structures (Arrays, Strings, LinkedLists)
- Pattern Recognition - Identify common algorithmic patterns
- Optimization Phase - Focus on time/space complexity improvements
- Advanced Topics - Trees, Graphs, Dynamic Programming
- Interview Readiness - Solve 150+ problems across all difficulty levels
- Complete Arrays & Strings fundamentals
- Implement basic LinkedList operations
- Master Stack & Queue applications
- Solve 50+ easy problems
- Advanced data structures (Trees, Graphs)
- Dynamic programming basics
- Solve 100+ problems across difficulties
- Build problem-solving templates
- Advanced algorithms and optimizations
- System design problem-solving
- Contribute to open source DSA projects
- Mentor other learners
Found a better solution? Have suggestions for improvement? Contributions welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/better-solution) - Add your solution with proper documentation
- Include test cases and complexity analysis
- Submit a pull request
- Follow the established code style and template
- Include detailed comments and complexity analysis
- Add comprehensive test cases
- Ensure solutions are optimal and readable
- LeetCode - Primary practice platform
- NeetCode - Curated problem sets
- Visualgo - Algorithm visualizations
- JavaScript.info - Modern JavaScript reference
- trekhleb/javascript-algorithms - Comprehensive JS algorithms
- TheAlgorithms/JavaScript - Community implementations
- JavaScript DSA Practice - Personal daily practice repository
- Frontend Freaks DSA - DSA course with 17 essential topics
- DSA TypeScript Implementation - Comprehensive DSA with TypeScript solutions
- Traversy JS Challenges - 70+ challenges from algorithms course
- JavaScript Algorithms - Popular algorithms with detailed explanations
- The Algorithms JavaScript - Community-driven algorithm implementations
- DSA with JavaScript - Data structures and algorithms in JavaScript
- Data Structures & Algorithms - Comprehensive DSA implementations
- JavaScript Data Structures Topic - Curated data structures repositories
- DSA Learning Series - Educational DSA repositories
- DSA with JavaScript Topic - JavaScript-focused DSA resources
- Namaste DSA Repository - Personal DSA learning journey
- NamasteDev Organization - Official GitHub organization
- NamasteDev Platform - Main learning platform
- Namaste React - React.js course implementations
- Frontend System Design - System design concepts
- Namaste YouTube - YouTube clone project
- Node.js Deep Dive - Node.js repository exploration
- All NamasteDev Repositories - Complete repository list
- Community React Repository - Community-driven React learning
- Top Frontend GitHub Repos - Curated frontend resources
- Git & Development Blog - Git tutorials and guides
This project is open source and available under the MIT License.
๐ฏ Daily Practice โข ๐ง Deep Learning โข ๐ Consistent Growth
"The expert in anything was once a beginner who refused to give up."
๐ Report Bug โข ๐ก Suggest Problem โข ๐จโ๐ป Follow Journey
Keep Coding, Keep Growing! ๐ฑ