A structured, revision-friendly archive of my daily Data Structures & Algorithms practice — one problem at a time.
Consistency over intensity. Show up daily, solve one more.
This repository is my learning diary in code. It began with the absolute basics — reversing arrays and printing numbers with recursion — and has grown into a full archive spanning trees, sliding windows, and monotonic stacks.
Every folder is a chapter. Every file is a problem I sat with, understood, and solved — mostly from LeetCode, with inline comments capturing the intuition so future-me can revise fast. The numbers you see below aren't the point; the daily habit behind them is.
From
console.log("Hello Recursion")to Binary Tree Maximum Path Sum — this is that path, kept honest and in order.
| Metric | Value |
|---|---|
| 🗣️ Language | JavaScript |
| 📚 Topic Modules | 15 |
| 🧩 Extra / Interview Sets | 3 |
| ✅ Problems Solved | 161 |
| 🌳 Deepest Topic | Trees (Binary Tree + BST) |
| 🔥 Latest Milestone | 100-Day Streak (7 Sep 2026) |
| 🎯 Now Solving | Numbers → next up: Heaps |
The path so far, grouped into phases. Each phase built the foundation for the next.
Phase 1 ─ Foundations Arrays · Recursion · Searching & Sorting
│
Phase 2 ─ Core Structures Linked List · Strings · Stack & Queue
│
Phase 3 ─ Patterns Binary Search · Two Pointers & Sliding Window · Strings Advanced
│
Phase 4 ─ Reinforcement Arrays Extra · Strings Extra · Interview & Pattern Sets · Extras
│
Phase 5 ─ Structures Binary Tree · Binary Search Tree
│
Phase 6 ─ Numbers (current) Number properties · digit techniques
│
Phase 7 ─ Next Heaps · Graphs · Dynamic Programming
Milestones along the way:
[ Start ] ───▶ 🥉 50 solved ───▶ 🎯 100 solved ───▶ 🔥 100-day streak ───▶ [ Ongoing ]
19 Jul 2026 15 Aug 2026 7 Sep 2026
Every snapshot below is a real checkpoint, saved in the Milestones/ folder.
One hundred straight days of showing up. The habit is the real win.
Triple digits. Momentum locked in.
The first big checkpoint — proof the routine was sticking.
| Milestone | Date | Snapshot |
|---|---|---|
| 🥉 50 Problems Solved | 19 July 2026 | Milestones/01-leetcode50-(19 July 2026).png |
| 🎯 100 Problems Solved | 15 Aug 2026 | Milestones/02-leetcode100Q-(15 Aug 2026).png |
| 🔥 100-Day Solving Streak | 7 Sep 2026 | Milestones/03-leetcode100D(7 Sep 2026).png, Milestones/03-leetcode100D(7 Sep 2026)-2.png |
Completed ✅ · In Progress 🚧 · Planned 🔜
- Arrays
- Recursion
- Searching & Sorting
- Binary Search Algorithm
- Linked List
- Strings
- Strings Advanced
- Stack & Queue
- Hashing-style frequency practice
- Two Pointers / Sliding Window
- Arrays — Extra Practice
- Strings — Extra Practice
- Interview & Pattern Questions
- Binary Tree
- Binary Search Tree (BST)
- Numbers
- 🔜 Heap / Priority Queue
- 🔜 Graphs
- 🔜 Dynamic Programming
| Module | Topic | Solved | Status |
|---|---|---|---|
| 00 | Interview & Pattern Questions | 2 | ✅ |
| 01 | Arrays | 12 | ✅ |
| 02 | Recursion | 8 | ✅ |
| 03 | Searching & Sorting | 6 | ✅ |
| 04 | Linked List | 14 | ✅ |
| 05 | Strings | 13 | ✅ |
| 06 | Stack & Queue | 12 | ✅ |
| 07 | Binary Search Algorithm | 10 | ✅ |
| 08 | Two Pointers & Sliding Window | 11 | ✅ |
| 09 | Strings — Advanced | 7 | ✅ |
| 10 | Arrays — Extra | 7 | ✅ |
| 11 | Strings — Extra | 4 | ✅ |
| 12 | Binary Tree | 20 | ✅ |
| 13 | Binary Search Tree (BST) | 5 | ✅ |
| 14 | Numbers | 1 | ✅ |
| — | Nested chapter extras | 15 | ✅ |
| — | Extras | 14 | ✅ |
| Total | 161 |
A quick map of the problem-solving tools this journey has built:
- Two Pointers — sorted-pair search, in-place partitioning, container/water problems
- Sliding Window — longest/shortest substring, permutation-in-string, window maximum
- Binary Search — on sorted arrays and on the answer space (rotated arrays, peaks)
- Fast & Slow Pointers — cycle detection, middle node, palindrome lists
- Monotonic Stack — next greater element, daily temperatures
- BFS / Level Order — trees, zigzag traversal, rotting oranges (grid BFS)
- DFS & Recursion — tree depth/diameter, path sums, subtree checks
- Hashing / Frequency Maps — anagrams, unique characters, grouping
- Prefix / Suffix Precompute — running sums, stable-index scoring
DSA_JS/
├── 00-Interview-Questions/ # Interview & pattern-based problems
├── 01-arrays/ # Core array problems
├── 02-Recursion/ # Recursion fundamentals + problems
├── 03-Searching-and-Sorting/ # Search & sort algorithms (+ notes images)
├── 04-Linked-List/ # Linked list problems
├── 05-Strings/ # Core string problems (+ notes image)
├── 06-Stack-and-Queue/ # Stack & queue problems (+ Notes/)
├── 07-Binary-Search-Algorithm/ # Binary search patterns
├── 08-Two-Pointers-&-Sliding-Window/ # Two pointers & sliding window
├── 09-Strings-Advanced/ # Advanced string problems (+ notes images)
├── 10-Arrays-Extra-Ques/ # Extra array practice
├── 11-Strings-Extra-Ques/ # Extra string practice
├── 12-BinaryTree/ # Binary tree traversal + problems (+ flow notes)
├── 13-BinarySearchTree(BST)/ # Binary search tree problems
├── 14-Numbers/ # Number properties and digit techniques
├── Extras/ # Miscellaneous solved problems
├── Milestones/ # Milestone snapshots
├── DSA-Revision-Sheet.pdf # Consolidated revision sheet
└── README.md
Each module is a chapter of the journey. Files are prefixed by solve order and the LeetCode problem ID.
🧩 00 · Interview Questions — pattern-based problems · 2 solved
Folder: 00-Interview-Questions/
Focus: interval merging, game-theory / math patterns.
| # | File | Problem |
|---|---|---|
| 01 | 01-mergeIntervals.js |
Merge Intervals |
| 02 | 02-divisorGame(leetcode-1025).js |
Divisor Game (LeetCode 1025) |
📊 01 · Arrays — the starting point · 12 solved
Folder: 01-arrays/
Focus: in-place edits, two-pointer basics, XOR tricks, prefix sums.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode26.js |
Remove Duplicates from Sorted Array |
| 02 | 02-leetcode27.js |
Remove Element |
| 03 | 03-leetcode344.js |
Reverse String |
| 04 | 04-leetcode121.js |
Best Time to Buy and Sell Stock |
| 05 | 05-leetcode88.js |
Merge Sorted Array |
| 06 | 06-leetcode283.js |
Move Zeroes |
| 07 | 07-leetcode485.js |
Max Consecutive Ones |
| 08 | 08-leetcode268.js |
Missing Number |
| 09 | 09-leetcode136.js |
Single Number |
| 10 | 10-leetcode1748.js |
Sum of Unique Elements |
| 11 | 11-leetcode1480.js |
Running Sum of 1d Array |
| 12 | 12-leetcode189.js |
Rotate Array |
Nested extras: extras/01-leetcode3843.js — count 3-digit even numbers; extras/02-leetcode2094.js — find 3-digit even numbers; extras/03-leetcode3550.js — smallest index with digit sum; extras/04-leetcode2778.js — Sum of Squares of Special Elements. 📝 Reference note: extras/indexing-cheatsheet.md — 0-based vs 1-based indexing mental model.
🔁 02 · Recursion — thinking in subproblems · 8 solved
Folder: 02-Recursion/
Focus: base cases, call-stack intuition, building toward divide & conquer.
| # | File | Problem |
|---|---|---|
| 01 | 01-basicRecursion.js |
Basic Recursion Intro |
| 02 | 02-one-To-n-Print.js |
Print 1 to N |
| 03 | 03-sum-of-n.js |
Sum of First N Numbers |
| 04 | 04-sum-of-element-array.js |
Sum of Array Elements |
| 05 | 05-sum-of-odd-element.js |
Sum of Odd Elements |
| 06 | 06-factorial.js |
Factorial |
| 07 | 07-leetcode231.js |
Power of Two |
| 08 | 08-leetcode509.js |
Fibonacci Number |
Nested extra: extras/01-leetcode22.js — Generate Parentheses.
🔎 03 · Searching and Sorting — the classics · 6 solved
Folder: 03-Searching-and-Sorting/
Focus: linear vs binary search, O(n²) sorts, and merge sort's divide & conquer.
| # | File | Problem |
|---|---|---|
| 01 | 01-linearSearch.js |
Linear Search |
| 02 | 02-binarySearch(leetcode-704).js |
Binary Search (LeetCode 704) |
| 03 | 03-bubbleSort.js |
Bubble Sort |
| 04 | 04-selectionSort.js |
Selection Sort |
| 05 | 05-insertionSort.js |
Insertion Sort |
| 06 | 06-mergeSort(leetcode912).js |
Merge Sort / Sort an Array (LeetCode 912) |
📝 Reference images: mergeSort-GPT.png, mergeSort-Sir.jpeg
Nested extra: extras/01-leetcode1051.js — Height Checker.
🔗 04 · Linked List — pointers everywhere · 14 solved
Folder: 04-Linked-List/
Focus: node manipulation, fast/slow pointers, reversal, cycle detection.
| # | File | Problem |
|---|---|---|
| 01 | 01-design-linkedlist-(leetcode-707).js |
Design Linked List |
| 02 | 02-leetcode876.js |
Middle of the Linked List |
| 03 | 03-leetcode206.js |
Reverse Linked List |
| 04 | 04-leetcode141.js |
Linked List Cycle |
| 05 | 05-leetcode234.js |
Palindrome Linked List |
| 06 | 06-leetcode160.js |
Intersection of Two Linked Lists |
| 07 | 07-leetcode203.js |
Remove Linked List Elements |
| 08 | 08-leetcode19.js |
Remove Nth Node From End of List |
| 09 | 09-leetcode83.js |
Remove Duplicates from Sorted List |
| 10 | 10-leetcode328.js |
Odd Even Linked List |
| 11 | 11-leetcode02.js |
Add Two Numbers |
| 12 | 12-leetcode21.js |
Merge Two Sorted Lists |
| 13 | 13-leetcode61.js |
Rotate List |
| 14 | 14-leetcode24.js |
Swap Nodes in Pairs |
Nested extra: extras/01-leetcode3217.js — Delete Nodes From Linked List Present in Array.
extras/02-leetcode1290.js — Convert Binary Number in a Linked List to Integer.
🔤 05 · Strings — text wrangling · 13 solved
Folder: 05-Strings/
Focus: traversal, frequency counting, palindromes, anagrams, hashing.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode58.js |
Length of Last Word |
| 02 | 02-leetcode2942.js |
Find Words Containing Character |
| 03 | 03-leetcode771.js |
Jewels and Stones |
| 04 | 04-leetcode3541.js |
Max Frequency Sum |
| 05 | 05-leetcode1221.js |
Split a String in Balanced Strings |
| 06 | 06-leetcode541.js |
Reverse String II |
| 07 | 07-leetcode125.js |
Valid Palindrome |
| 08 | 08-leetcode1903.js |
Largest Odd Number in String |
| 09 | 09-leetcode14.js |
Longest Common Prefix |
| 10 | 10-leetcode242.js |
Valid Anagram |
| 11 | 11-leetcode205.js |
Isomorphic Strings |
| 12 | 12-leetcode49.js |
Group Anagrams |
| 14 | 14-leetcode520.js |
Detect Capital |
📝 Reference image: 13-interview.png
Nested extra: extras/01-leetcode3498.js — Reverse Degree of a String.
extras/02-leetcode1832.js — Check if the Sentence Is Pangram.
extras/03-leetcode1614.js — Maximum Nesting Depth of the Parentheses.
📚 06 · Stack and Queue — LIFO, FIFO & monotonic stacks · 12 solved
Folder: 06-Stack-and-Queue/
Focus: parentheses matching, min stack, monotonic stacks, grid BFS.
| # | File | Problem |
|---|---|---|
| 01 | 01-playing.js |
Stack / Queue Playground |
| 02 | 02-leetcode225.js |
Implement Stack using Queues |
| 03 | 03-leetcode232.js |
Implement Queue using Stacks |
| 04 | 04-leetcode20.js |
Valid Parentheses |
| 05 | 05-leetcode155.js |
Min Stack |
| 06 | 06-leetcode1021.js |
Remove Outermost Parentheses |
| 07 | 07-leetcode150.js |
Evaluate Reverse Polish Notation |
| 08 | 08-leetcode496.js |
Next Greater Element I |
| 09 | 09-leetcode739.js |
Daily Temperatures |
| 10 | 10-leetcode503.js |
Next Greater Element II |
| 11 | 11-leetcode994.js |
Rotting Oranges |
| 12 | 12-leetcode2390.js |
Removing Stars From a String |
📝 Extra notes in Notes/ (prototype.png)
Nested extras: extras/01-leetcode682.js — Baseball Game; extras/02-leetcode844.js — Backspace String Compare.
🎯 07 · Binary Search Algorithm — searching smarter · 10 solved
Folder: 07-Binary-Search-Algorithm/
Focus: classic binary search plus searching on the answer space and rotated arrays.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode69.js |
Sqrt(x) |
| 02 | 02-leetcode374.js |
Guess Number Higher or Lower |
| 03 | 03-leetcode33.js |
Search in Rotated Sorted Array |
| 04 | 04-leetcode278.js |
First Bad Version |
| 05 | 05-leetcode162.js |
Find Peak Element |
| 06 | 06-leetcode153.js |
Find Minimum in Rotated Sorted Array |
| 07 | 07-leetcode34.js |
Find First and Last Position of Element in Sorted Array |
| 08 | 08-leetcode852.js |
Peak Index in a Mountain Array |
| 09 | 09-leetcode540.js |
Single Element in a Sorted Array |
| 10 | 10-leetcode658.js |
Find K Closest Elements |
↔️ 08 · Two Pointers and Sliding Window — the workhorse patterns · 11 solved
Folder: 08-Two-Pointers-&-Sliding-Window/
Focus: opposite/converging pointers, fixed & dynamic windows, deque optimization.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode01.js |
Two Sum |
| 02 | 02-leetcode167.js |
Two Sum II - Input Array Is Sorted |
| 03 | 03-leetcode392.js |
Is Subsequence |
| 04 | 04-leetcode28.js |
Find the Index of the First Occurrence in a String |
| 05 | 05-leetcode11.js |
Container With Most Water |
| 06 | 06-leetcode15.js |
3Sum |
| 07 | 07-leetcode42.js |
Trapping Rain Water |
| 08 | 08-leetcode03.js |
Longest Substring Without Repeating Characters |
| 09 | 09-leetcode424.js |
Longest Repeating Character Replacement |
| 10 | 10-leetcode567.js |
Permutation in String |
| 11 | 11-leetcode239.js |
Sliding Window Maximum |
Nested extra: extras/01-leetcode75.js — Sort Colors.
🧵 09 · Strings Advanced — harder text problems · 7 solved
Folder: 09-Strings-Advanced/
Focus: stack-based parsing, recursion on strings, greedy reorganization.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode921.js |
Minimum Add to Make Parentheses Valid |
| 02 | 02-leetcode151.js |
Reverse Words in a String |
| 03 | 03-leetcode1781.js |
Sum of Beauty of All Substrings |
| 04 | 04-leetcode394.js |
Decode String |
| 05 | 05-leetcode38.js |
Count and Say |
| 06 | 06-leetcode767.js |
Reorganize String |
| 07 | 07-leetcode686.js |
Repeated String Match |
📝 Reference images: 04-leetcode-394(Recursion).png, 05-leetcode-38(CountandSay).png
➕ 10 · Arrays — Extra Questions — reinforcement reps · 7 solved
Folder: 10-Arrays-Extra-Ques/
Focus: extra array practice — majority element, Kadane's, duplicates.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode1752.js |
Check if Array Is Sorted and Rotated |
| 02 | 02-leetcode3866.js |
First Unique Even Number |
| 03 | 03-leetcode1929.js |
Concatenation of Array |
| 04 | 04-leetcode169.js |
Majority Element |
| 05 | 05-leetcode2114.js |
Maximum Number of Words Found in Sentences |
| 06 | 06-leetcode217.js |
Contains Duplicate |
| 07 | 07-leetcode53.js |
Maximum Subarray |
➕ 11 · Strings — Extra Questions — more reps · 4 solved
Folder: 11-Strings-Extra-Ques/
Focus: adjacent-duplicate removal, sliding-window on strings, compression.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode1047.js |
Remove All Adjacent Duplicates In String |
| 02 | 02-leetcode3090.js |
Maximum Length Substring With Two Occurrences |
| 03 | 03-leetcode387.js |
First Unique Character in a String |
| 04 | 04-leetcode443.js |
String Compression |
🌳 12 · Binary Tree — traversal and path problems · 20 solved
Folder: 12-BinaryTree/
Focus: all traversals (recursive + iterative), level-order/BFS, depth, path & LCA problems.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode144.js |
Binary Tree Preorder Traversal |
| 02 | 02-leetcode94.js |
Binary Tree Inorder Traversal |
| 03 | 03-leetcode145.js |
Binary Tree Postorder Traversal |
| 04 | 04-leetcode102.js |
Binary Tree Level Order Traversal |
| 05 | 05-leetcode107.js |
Binary Tree Level Order Traversal II |
| 06 | 06-leetcode103.js |
Binary Tree Zigzag Level Order Traversal |
| 07 | 07-leetcode104.js |
Maximum Depth of Binary Tree |
| 08 | 08-leetcode112.js |
Path Sum |
| 09 | 09-leetcode101.js |
Symmetric Tree |
| 10 | 10-leetcode226.js |
Invert Binary Tree |
| 11 | 11-leetcode100.js |
Same Tree |
| 12 | 12-leetcode110.js |
Balanced Binary Tree |
| 13 | 13-leetcode543.js |
Diameter of Binary Tree |
| 14 | 14-leetcode572.js |
Subtree of Another Tree |
| 15 | 15-leetcode236.js |
Lowest Common Ancestor of a Binary Tree |
| 16 | 16-leetcode199.js |
Binary Tree Right Side View |
| 17 | 17-leetcode1448.js |
Count Good Nodes in Binary Tree |
| 18 | 18-leetcode116.js |
Populating Next Right Pointers in Each Node |
| 19 | 19-leetcode124.js |
Binary Tree Maximum Path Sum |
| 20 | 20-leetcode662.js |
Maximum Width of Binary Tree |
📝 Flow notes (*-flow.png, *-iterative-flow.png) walk through recursive and iterative traversal approaches.
Nested extra: extras/01-leetcode2265.js — Count Nodes Equal to Average of Subtree.
🌲 13 · Binary Search Tree (BST) — ordered trees · 5 solved
Folder: 13-BinarySearchTree(BST)/
Focus: BST invariants, ordered traversal, search/insert, LCA on a BST.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode98.js |
Validate Binary Search Tree |
| 02 | 02-leetcode700.js |
Search in a Binary Search Tree |
| 03 | 03-leetcode701.js |
Insert into a Binary Search Tree |
| 04 | 04-leetcode230.js |
Kth Smallest Element in a BST |
| 05 | 05-leetcode235.js |
Lowest Common Ancestor of a BST |
🔢 14 · Numbers — number properties · 1 solved
Folder: 14-Numbers/
Focus: digit extraction, repeated transformations, and cycle detection.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode202.js |
Happy Number |
🧪 Extras — off-path practice · 14 solved
Folder: Extras/
Additional solved problems outside the main numbered path — daily challenges and one-offs.
| # | File | Problem |
|---|---|---|
| 01 | 01-leetcode-1464.js |
Maximum Product of Two Elements in an Array |
| 02 | 02-leetcode-961.js |
N-Repeated Element in Size 2N Array |
| 03 | 03-leetcode3731.js |
Find Missing Elements |
| 04 | 04-leetcode1342.js |
Number of Steps to Reduce a Number to Zero |
| 05 | 05-leetcode1281.js |
Subtract the Product and Sum of Digits of an Integer |
| 06 | 06-leetcode55.js |
Jump Game |
| 07 | 07-leetcode2169.js |
Count Operations to Obtain Zero |
| 08 | 08-leetcode3718.js |
Smallest Missing Multiple of K |
| 09 | 09-leetcode3903.js |
Smallest Stable Index I |
| 10 | 10-leetcode3904.js |
Smallest Stable Index II |
| 11 | 11-leetcode9.js |
Palindrome Number |
| 12 | 12-leetcode35.js |
Search Insert Position |
| 13 | 13-leetcode3870.js |
Count Commas (brute force → counting) |
| 14 | 14-leetcode3871.js |
Count Commas (grouped O(log n) counting) |
Each file is plain JavaScript and runs with Node.js:
# from the repo root
node 12-BinaryTree/20-leetcode662.jsMost files include a small driver / sample call at the bottom, plus inline comments explaining the approach.
- Pick a chapter — folders are numbered in learning order (00 → 14), then
Extras/. - Read the file name — prefixed with a solve-order number and the LeetCode problem ID.
- Follow the comments — most solutions explain the intuition, complexity, and edge cases inline.
- Check the images —
.png/.jpegfiles are hand-drawn notes, flow diagrams, or milestone snapshots. - Revise fast — the
DSA-Revision-Sheet.pdfcollects key takeaways in one place.
- Consistency — to keep the daily solving habit visible and accountable.
- Fundamentals — to build genuine strength across every core DSA topic.
- Revision — to make a JavaScript-first archive I can quickly review before interviews.
- Growth — to document milestones and watch problem-solving confidence compound over time.
The roadmap ahead:
- Heaps / Priority Queues — top-K, scheduling, streaming medians
- Graphs — BFS/DFS, topological sort, shortest paths, union-find
- Dynamic Programming — memoization → tabulation, knapsack, sequences, grids
161 problems in. Numbers today, graphs tomorrow.
Consistency over intensity. One problem at a time. 💪


