Mustaque Nadim Academy

Data Structures & Algorithms, A Story

Every structure and algorithm derived from a real problem — following the GeeksforGeeks curriculum, told as a story, with code in Python, TypeScript, and Java.

Most DSA courses hand you a definition and a diagram, then wonder why none of it sticks. This track is different. Every lesson starts with a problem you can feel — an app that's crawling, a task eating your whole afternoon — and then we discover the data structure or algorithm together, the same way it was really invented.

By the time we name the thing ("this is a hash table", "this is binary search"), you already understand why it has to exist. The name becomes a label for something you own.

Follows the GeeksforGeeks DSA curriculum

The topics and ordering mirror the GeeksforGeeks DSA Tutorial, so you can use this as a story-driven companion to it. Code samples come in Python, TypeScript, and Java.

The roadmap

1 · Fundamentals

Two programs solve the same task — one finishes before you blink, the other never finishes at all. The difference is data structures and algorithms.

2 · Recursion & Math

A problem that contains smaller copies of itself can be solved by a function that calls itself — once it clicks, whole classes of problems get simpler.

3 · Arrays & Strings

You need to store a million readings and grab any one instantly — arrays give you that superpower, with one big catch.

4 · Searching

Looking for one item by checking each in turn is the most natural thing in the world — and the baseline every faster search must beat.

5 · Sorting

Sorting feels like busywork until you notice it unlocks binary search, deduplication, and half the algorithms you’ll ever write.

6 · Bit Manipulation

Underneath every number is a row of switches — learn AND, OR, XOR, and shifts, and some problems become one-liners.

7 · Hashing

How do you turn "a name" into "a shelf number" so you always know where to look? That mapping is a hash function.

8 · Two Pointers

Checking every pair takes forever — but two pointers walking a sorted array collapse many problems from O(n²) to O(n).

9 · Sliding Window

Finding the best stretch of consecutive items shouldn’t mean re-checking every window from scratch — slide instead of restart.

10 · Prefix Sum

You keep being asked for the sum of a range, over and over — precompute once and every query becomes a subtraction.

11 · Backtracking

To solve a puzzle you try a move, and if it dead-ends you undo it and try another — brute force with a brain.

12 · Linked List

Inserting at the front of a giant array means shifting everything — what if each item just pointed to the next instead?

13 · Stack

The undo button, the back button, matching brackets — they all share one rule: last in, first out.

14 · Queue

A print line, a support queue — first come, first served — is a data structure with its own rules.

15 · Deque

Sometimes you need to add and remove from both ends — a double-ended queue is the best of both worlds.

16 · Binary Tree

File systems, org charts, family trees all branch — the binary tree is the simplest way to capture that shape.

17 · Binary Search Tree

What if a tree kept itself sorted, so every lookup could throw away half the remaining nodes? That’s a BST.

18 · Heap

You constantly need the single most urgent task out of thousands, and it keeps changing — a heap hands it over instantly.

19 · Graph

Cities linked by roads, people by friendships, tasks by dependencies — before we explore a network, we must store it.

20 · Greedy

Sometimes grabbing the best option at every step gives the best overall answer — and sometimes it fails. Knowing which is the game.

21 · Dynamic Programming

Computing the 50th Fibonacci naively makes billions of repeated calls — DP is the art of never solving a subproblem twice.

22 · Number Theory

A handful of number facts — divisibility, GCD, primes — power a surprising range of algorithms.

23 · Trie

Autocomplete has to find every word starting with "str" out of millions — a trie makes prefix search almost free.

24 · String Matching

Finding "cat" inside a huge document by re-checking every position wastes work — smarter algorithms never look twice.

25 · Range Queries

You need the sum (or min, or max) of any range in a constantly-changing array — a segment tree answers and updates in log time.

How is this guide?

Last updated on

On this page