Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA with JavaScript 🧠

Complete JavaScript implementations of fundamental and advanced data structures and algorithms — stacks, queues, linked lists, trees, sorting, graphs, hash tables, and recursion. Built from scratch, no libraries.

Following the roadmap.sh DSA guide as a structured curriculum. Every implementation is written in pure ES6+ JavaScript and runnable directly with Node.js.


Table of Contents


What's Implemented

Data Structures

Folder Structure Variants
Stack Stack Array-based, Linked list–based
Queue Queue Array-based, Linked list–based, Priority Queue
LinkList Linked List Singly, Doubly, Circular
Hash-Tables Hash Table With collision resolution
Tree Trees BST, B-Tree, B+ Tree, AVL Tree
Graph Graph Adjacency list representation

Algorithms

Folder Topic What's Covered
Sorting Sorting Bubble, Selection, Insertion, Merge, Quick, Heap Sort
Graph Graph Traversal BFS (Breadth-First Search), DFS (Depth-First Search)
Recursion Recursion Factorial, Fibonacci, sum of natural numbers, recursive patterns
Array Array Algorithms Array manipulation and common interview problems
patterns Pattern Printing Numeric, star, and mixed console patterns

Fundamentals

Folder Topic
Master_basics DSA fundamentals and problem-solving patterns
Mater_basics JavaScript basics — arithmetic, control flow, functions

How to Run

No installation needed beyond Node.js.

# 1. Clone the repo
git clone https://github.com/Wcoder547/DSA_WITH_JS.git
cd DSA_WITH_JS

# 2. Navigate to any folder
cd Sorting

# 3. Run any file
node quickSort.js

Every file is standalone — just node <filename>.js.


Project Structure

DSA_WITH_JS/
├── Array/            # Array manipulation & problems
├── Graph/            # BFS, DFS traversal
├── Hash-Tables/      # Hash table with collision resolution
├── LinkList/         # Singly, Doubly, Circular linked lists
├── Master_basics/    # DSA fundamentals
├── Mater_basics/     # JS basics
├── Queue/            # Array, linked list, priority queue
├── Recursion/        # Recursive algorithms
├── Sorting/          # 6 sorting algorithms
├── Stack/            # Array-based & linked list–based stack
├── Tree/             # BST, B-Tree, B+ Tree, AVL Tree
└── patterns/         # Pattern printing

Upcoming

  • Trie — prefix tree for string operations
  • Segment Tree — range query and update
  • Fenwick Tree (Binary Indexed Tree) — efficient prefix sums
  • Suffix Array & Suffix Tree — advanced string algorithms

References


About

DSA is the foundation of everything in software engineering — understanding how data is stored, accessed, and transformed is what separates writing code that works from writing code that scales.

This repo was built by working through the roadmap.sh DSA curriculum in JavaScript, implementing every structure and algorithm from scratch without libraries. The goal was depth over speed: understanding why a B+ Tree splits the way it does, why quicksort degrades on sorted input, why a hash table needs collision resolution.

Built by Waseem Akram — Full-Stack Developer and DevOps Engineer based in Pakistan, working across the MERN stack, Generative AI integrations, and cloud automation.


If this helped you, consider giving it a ⭐

About

Complete DSA implementations in JavaScript — stacks, queues, linked lists, trees (BST/AVL/B+), sorting algorithms, BFS/DFS, hash tables & recursion. No libraries, pure ES6+.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages