Marsof Academy
Course 1 · Unit 3

Computer science

Part of Foundations: programming and data

  • 8 lessons
  • ≈ 26 h of study
  • Level: beginner

Data structures, algorithms, complexity and memory, with a final advanced and optional block on concurrency and distributed systems.

Topics covered

  • Data structures
  • Arrays
  • Lists
  • Stacks
  • Queues
  • Hash tables
  • Trees
  • Graphs
  • Sorting
  • Searching
  • Recursion
  • Big O
  • Memory
  • Processes
  • Threads
  • Concurrency
  • Networking
  • Distributed systems

Lessons in this unit

  1. Complexity and Big O notation 70 min
    Learn to predict how long your code will take when the data grows from a thousand to a billion.
  2. Arrays, linked lists, stacks and queues 70 min
    The simplest data structures, what each operation costs and why choosing badly sinks a system's performance.
  3. Hash tables and sets 60 min
    How dict and set manage to answer in constant time, and why every tokeniser, cache and deduplicator depends on it.
  4. Recursion 80 min
    Functions that call themselves, the call stack that makes it possible and the memoisation that turns exponential into polynomial.
  5. Sorting and searching 80 min
    Binary search, merge sort and quicksort, and how they show up in token sampling, top-k and document retrieval.
  6. Trees and graphs 80 min
    The structures that model relationships, from decision trees to the computation graphs that backpropagation walks through.
  7. Advanced (optional): threads, races and locks 105 min · optional
    Why two threads sharing data can produce impossible results, and how locks, acquisition order and queues prevent it.
  8. Advanced (optional): distributed systems in 45 minutes 85 min · optional
    What changes when your program depends on other machines - latency, partial failures, retries, idempotency, replicas and consistency.

Prerequisites

Before this unit it helps to have done:

The full explanations, auto-graded exercises, exams and projects are inside the academy.

Every lesson you complete gives you 10 yang, the academy's currency, and every unit exam you pass, 50.

Shall we start?

Create your account and activate your subscription: you get the whole syllabus from day one.