---
title: "Algorithms and data structures — ZudoJS Academy"
description: "Measure code with Big O, build the classic data structures in JavaScript, learn the algorithms every engineer uses, and solve problems with named patterns instead of guesswork."
source: https://zudojs.oyinlola.site/learn/algorithms
---

LEVEL 3 · JAVASCRIPT

Course Core

# Algorithms and data structures

Measure code with Big O, build the classic data structures in JavaScript, learn the algorithms every engineer uses, and solve problems with named patterns instead of guesswork.

- **19 lessons**
- **17 h** to read and try
- **Before this:** [JavaScript fundamentals](https://zudojs.oyinlola.site/learn/javascript)

0 of 19 lessons done

[Start lesson 1 →](https://zudojs.oyinlola.site/learn/dsa-complexity)

## When you finish, you can

- State the time and space complexity of a piece of code and justify it
- Implement stacks, queues, linked lists, hash maps, trees, heaps, graphs and tries
- Implement and compare searching and sorting algorithms
- Solve problems with recursion, divide and conquer, BFS, DFS, greedy choices, backtracking and dynamic programming
- Recognise when a problem fits frequency counting, two pointers, a sliding window or binary search

**You build:** Your own tested library of data structures and algorithms

MODULE 1

## Measuring code

1. [1**Big O and complexity**Measure how code grows with its input: count steps, state time and space complexity in Big O, Ω and Θ, spot hidden loops and see why push is cheap.50 min](https://zudojs.oyinlola.site/learn/dsa-complexity)

MODULE 2

## Data structures

1. [2**Arrays and strings under the hood**Learn what array and string operations really cost, from indexing to shift and string building, then solve reverse, palindrome, anagram and rotate with tests.50 min](https://zudojs.oyinlola.site/learn/dsa-arrays-strings)
2. [3**Hash maps and sets**Build a hash table from scratch with hashing, buckets, collisions and resizing, then use Map and Set for lookups, counting, dedupe and two-sum.55 min](https://zudojs.oyinlola.site/learn/dsa-hash-maps)
3. [4**Stacks and queues**Build stacks, queues, a ring buffer and a deque in JavaScript, then use them for undo and redo, bracket checking and a retrying job queue.55 min](https://zudojs.oyinlola.site/learn/dsa-stacks-queues)
4. [5**Linked lists and the LRU cache**Build singly and doubly linked lists in JavaScript, reverse them, detect cycles, and use one to build an O(1) LRU cache for product lookups.55 min](https://zudojs.oyinlola.site/learn/dsa-linked-lists)
5. [6**Trees and binary search trees**Turn flat category rows into a tree, walk it four ways, then build, test and balance a binary search tree of orders, with the cost of every operation.55 min](https://zudojs.oyinlola.site/learn/dsa-trees)
6. [7**Heaps and priority queues**Build a binary heap on a plain array, use it as a priority job queue, then sort with it, find the top-k products and merge sorted order lists.50 min](https://zudojs.oyinlola.site/learn/dsa-heaps)
7. [8**Graphs and topological sort**Model packages, roads between cities and followers as graphs, store them as adjacency lists, and compute a safe install order with topological sort.55 min](https://zudojs.oyinlola.site/learn/dsa-graphs)
8. [9**Tries and autocomplete**Build a prefix tree for product search: autocomplete as the user types, count matches per prefix, delete safely, and weigh the memory it costs.45 min](https://zudojs.oyinlola.site/learn/dsa-tries)

MODULE 3

## Algorithms

1. [10**Linear and binary search**Find an order among a million by scanning and by halving, write binary search three ways, catch its classic bugs, and use lower and upper bounds for ranges.50 min](https://zudojs.oyinlola.site/learn/dsa-searching)
2. [11**Sorting algorithms**Build bubble, selection, insertion, merge and quick sort, count their comparisons, then sort real orders by several keys with a stable, tested sort.55 min](https://zudojs.oyinlola.site/learn/dsa-sorting)
3. [12**Divide and conquer**Split problems into halves, solve the halves and combine: find delivery-time percentiles with quickselect, compute powers fast, and predict costs with recursion trees.55 min](https://zudojs.oyinlola.site/learn/dsa-divide-conquer)
4. [13**Graph search**Route parcels between delivery hubs with breadth-first search, walk a warehouse maze, find cut-off areas and circular transfers with depth-first search, and meet Dijkstra.55 min](https://zudojs.oyinlola.site/learn/dsa-graph-search)
5. [14**Greedy algorithms**Give change in naira notes, book meeting rooms and load a van by always taking the best-looking choice, then prove when that works and catch it failing with tests.50 min](https://zudojs.oyinlola.site/learn/dsa-greedy)

MODULE 4

## Problem-solving patterns

1. [15**The frequency counter pattern**Replace nested loops with one counting pass: check anagram usernames, reconcile lists, find the first unmatched entry and the majority, in O(n).45 min](https://zudojs.oyinlola.site/learn/pattern-frequency)
2. [16**The two pointers pattern**Walk sorted data from both ends or at two speeds: pair refunds, dedupe order ids in place, size a tank, and find loops and midpoints with O(1) extra space.50 min](https://zudojs.oyinlola.site/learn/pattern-two-pointers)
3. [17**Sliding window and prefix sums**Find the best 7 days of revenue, the longest on-time streak and any range total without re-adding numbers, using sliding windows and prefix sums.55 min](https://zudojs.oyinlola.site/learn/pattern-sliding-window)
4. [18**Binary search on the answer**Use binary search beyond sorted arrays: find the smallest truck capacity, the first failing build and items in rotated lists by halving a range of answers.55 min](https://zudojs.oyinlola.site/learn/pattern-binary-search)
5. [19**Pattern practice**Solve eleven unlabelled problems by first naming the pattern and why, then coding, testing and analysing, plus two interview walkthroughs.60 min](https://zudojs.oyinlola.site/learn/pattern-practice)

## Course checkpoint

Prove you can move on. The checkpoint picks 20 questions at random from every lesson in this course. Get 16 right to pass. Your result is saved in this browser only.
