Sikau

Learn Data structures

Big-O, hash maps, stacks, queues, trees, heaps and graphs — built by hand.

Learn why some code stays fast as data grows. Measure work with Big-O, then build the classic data structures yourself in JavaScript — dynamic arrays, hash tables, stacks, queues, ring buffers, linked lists, an LRU cache, trees, binary search trees, heaps and graphs — with checks that test both correctness and speed.

Intermediate · 13 lessons · about 8 hours · free

Start Data structures free: run real code in your browserright here

Continue with Google

What you will learn

Unit 1: Speed and lookups

Big-O, arrays and hash maps — the tools that make code fast.

  1. Day 1How fast is fast? Big-OCount steps, not seconds: O(1), O(n), O(n²), O(log n).30 min
  2. Day 2Arrays under the hoodIndexing, appending, inserting and removing — and what each costs.30 min
  3. Day 3Hash maps and setsO(1) lookups: how hashing works and the patterns it unlocks.35 min
  4. Day 4Project: Review analyserWord frequencies, top-k and anagram groups with maps.40 min

Unit 2: Linear structures

Stacks, queues, linked lists and an LRU cache.

  1. Day 5StacksLast in, first out: undo, call stacks and bracket matching.30 min
  2. Day 6QueuesFirst in, first out — and an O(1) queue without shift().30 min
  3. Day 7Linked listsNodes and pointers: O(1) inserts at known spots, O(n) access.35 min
  4. Day 8Project: LRU cacheA fixed-size cache that evicts the least recently used item in O(1).45 min

Unit 3: Trees, heaps and graphs

Recursion, binary search trees, priority queues and graph search.

  1. Day 9Recursion and treesHierarchies, depth-first walks and recursive thinking.35 min
  2. Day 10Binary search treesOrdered trees: O(log n) search, insert, and sorted traversal.40 min
  3. Day 11Heaps and priority queuesAlways get the smallest (or most urgent) item in O(log n).40 min
  4. Day 12GraphsNodes and edges, adjacency lists, BFS and DFS.40 min
  5. Day 13Capstone: Delivery dispatcherA heap for urgent orders plus BFS distances on the town graph.50 min

Before you start

These courses make Data structures easier:

See all courses

Built with ❤️ by dibe.sh