algos-lab course outline

Algorithms & Data Structures

Bachelor in Computer Science and Artificial Intelligence (BCSAI) · IE University · the tools for solving computational problems.

An algorithm is a well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output. This course builds a strong understanding of the data structures and algorithms available when solving a problem with a computer program — and of how to compare which one is best for the problem at hand.

To make these concepts stick, the course leans on practice and group work as the main learning and grading vehicles, just as in real software engineering.

Program
BCSAI · SEP-2025
Course code
ADS-CSAI.2.M.A
Area
Computer Science
Sessions
30
Credits
6.0 ECTS
Year / course
25-26 · Second
Semester
Category
Compulsory
Language
English
Professor
Antonio Momblán Jiménez
Contact
amomblan@faculty.ie.edu
Workload
150 hours total

Learning objectives

By the end of the course, students should be able to:

Methodology & assessment

A collaborative, active, applied method: theory sessions paired with practice sessions where students implement algorithms themselves. Three of the 30 sessions are Continuous Evaluation, held after modules 3, 6 and 7.

Learning activities (time weighting)

Group work36.7%
Individual studying33.3%
Lectures23.3%
Discussions6.7%

Estimated 35h lectures · 10h discussions · 55h group work · 50h individual study = 150h.

Final grade (evaluation criteria)

Final exam30%
Group work30%
Continuous evaluation30%
Class participation10%
Continuous Evaluation30%

Three 80-minute timed coding tests during class (sessions 14, 24, 29), each implementing a specific algorithm over the material of the preceding modules (2–3, 4–6, and 7).

Deliverable: working code submitted in class. Evaluation: correctness (does it produce the right output?) and performance (does it meet the expected complexity?).
Group Work — Capstone30%

In teams of 3–4, implement a board game of your choice (kicked off in session 6, presented in sessions 27–28), applying the course's algorithms and data structures.

Deliverable: the implemented game plus a 10–15 min presentation. Evaluation: choice of board game, algorithms used and why, data structures used and why, and problems encountered and how they were solved.
Final Exam30%

A comprehensive test in session 30 with theoretical and practical questions on all topics from session 1 to session 26.

Deliverable: individual written exam. Evaluation: understanding of concepts plus ability to apply and analyse them.
Class Participation10%

Active, ongoing engagement in discussions and problem-solving throughout every session.

Deliverable: sustained in-class contribution. Evaluation: quality and consistency of engagement.

Workload & pass rules: 6 ECTS ≈ 150 hours total. The final grade is the weighted sum of the four components above. Attendance and conduct follow IE University's official Attendance, Code of Conduct and Ethics policies; a re-sit/re-take policy applies per university rules. AI policy: GenAI may be used only to research and enhance content learned in class, with explicit acknowledgement — it is prohibited for producing code in graded assignments, resolving gradable assignments, and resolving exercises/homework; misuse is academic misconduct.

theory / live session practice session continuous evaluation

Program — 7 modules, 30 sessions

Every numbered session below comes straight from the syllabus. Where a topic has a live demo on the main page, follow the ▸ link.

Module 1 Introduction sessions 1–2 · what algorithms are and how we measure them

The course opens by framing the discipline: an algorithm is a precise procedure that maps inputs to outputs, and a data structure is the way we lay that input out in memory. Before writing a single line of code we need a language to compare candidate solutions — asymptotic analysis — so that "which algorithm is best?" becomes a question we can answer quantitatively rather than by intuition.

Learning outcomes
  • Define an algorithm formally and recognise the classes of problems algorithms solve.
  • Reason about cost using asymptotic notation independently of hardware or language.
  • Distinguish best-, average- and worst-case behaviour, and time vs. space cost.
Session 1Introduction

Introduction to the course; understand the methodologies and tools used throughout. Get a proper definition of what an algorithm is and the kind of problems algorithms solve.

  • Course methodology, tools and grading vehicles — how theory, practice sessions and group work fit together over the 30 sessions.
  • Definition of an algorithm — a finite, deterministic, well-defined procedure mapping input to output; correctness vs. efficiency as separate concerns.
Key idea: every algorithm we study trades off time, space and simplicity — there is rarely a single "best", only the best for a given problem and constraints.
Session 2Algorithm analysis

Introduction to asymptotic notation as a means to describe the efficiency of an algorithm, capturing the order of growth of both time and space as a function of input size n.

  • Asymptotic notation — Big-O (upper bound), Ω (lower bound) and Θ (tight bound); why we drop constants and lower-order terms.
  • Order of growth — comparing constant, logarithmic, linear, linearithmic, quadratic and exponential cost as n grows.
constant O(1) log O(log n) linear O(n) linearithmic O(n log n) quadratic O(n²) exponential O(2ⁿ)
Key idea: asymptotic cost describes how an algorithm scales, not how fast it runs on one input — an O(n log n) method eventually beats an O(n²) one no matter the constants.
Big-O comparison demo
Cormen — Ch. 2–3Grokking — Ch. 1Cormen Ch. 3 formalises asymptotic notation; Grokking Ch. 1 gives the gentle Big-O intuition.
Module 2 Searching and sorting sessions 3–10 · foundations, recursion & divide-and-conquer

The largest module builds the core toolkit. We start from the two most basic linear stores — arrays and linked lists — and the elementary O(n²) sorts, then introduce recursion and the divide-and-conquer paradigm that unlocks O(log n) search and O(n log n) sorting. By the end, students can pick the right sort or search for a given memory and access pattern and justify it with a complexity argument.

Learning outcomes
  • Explain how arrays and linked lists differ in memory layout, indexing and insertion cost.
  • Implement and analyse insertion, bubble, quick and merge sort, and binary search.
  • Apply divide-and-conquer and recurrence reasoning to decompose problems.
  • Choose between competing sorts/searches based on stability, memory and input shape.
Session 3Arrays and Linked Lists. Searching and sorting

Understand how simple linear data structures store data in memory, and how the distribution of that data impacts how items can be rearranged and looked up. Arrays give contiguous, index-addressable storage; linked lists scatter nodes joined by pointers.

  • Arrays — contiguous memory enabling O(1) random access by index, but O(n) insertion/deletion from shifting.
  • Linked lists — pointer-joined nodes giving O(1) insert/delete at a known position but O(n) access and linear search.
array access O(1) array insert O(n) list access O(n) list insert O(1)
Key idea: memory layout dictates cost — contiguity buys fast indexing, pointers buy cheap restructuring. The structure you choose encodes which operation you want to be cheap.
Session 4Searching and sorting (II)

Foundations of sorting a collection of items; implement your first sorting algorithms. Both are simple, in-place, comparison-based sorts that are quadratic in the worst case.

  • Insertion Sort — grow a sorted prefix one element at a time; O(n²) worst case but O(n) on nearly-sorted input.
  • Bubble Sort — repeatedly swap adjacent out-of-order pairs until no swaps remain; always O(n²) comparisons.
insertion O(n²) bubble O(n²) space O(1)
Invariant: after pass k of insertion sort, the first k elements are fully sorted among themselves — the engine of every elementary sort is a loop invariant.
Sorting race demo
Session 5Searching and sorting (III)

How linked lists can be a good alternative to arrays when memory efficiency matters; when each structure is better suited. Linked lists grow without reallocation but lose locality of reference.

  • Linked lists for memory-efficient storage — dynamic growth without pre-sized buffers; singly vs. doubly linked variants.
  • Array vs. linked-list trade-offs — random access & cache locality (array) vs. cheap splicing & unbounded growth (list).
Key idea: prefer arrays when you index and iterate; prefer linked lists when you insert/remove at known positions and cannot bound the size in advance.
Session 6Introduction to the Group Assignment & Practice Sessionpractice

Kick-off of the capstone: from here until session 27, groups implement a board game of their choice, applying the algorithms and data structures learned in the course.

  • Board game coding assignment details — scope, deliverables and timeline of the term-long project.
  • Rubrics and grading methodology — how the project is evaluated.
  • Set up the groups — teams of 3–4 members.
  • Practice — a coding challenge mirroring the Continuous Evaluations to come.
Key idea: the board game is the thread that ties theory to practice — every data structure you meet later is a candidate tool for your own game's state, moves and AI.
Session 7Recursive algorithms (I)

Recursion as a tool to enhance the expressiveness of an algorithm; the Divide and Conquer strategy that splits a large problem into independent subproblems, solves them recursively, and combines the results.

  • Recursion fundamentals — base case vs. recursive case; the call stack; how a problem refers to a smaller instance of itself.
  • Divide and Conquerdivide into subproblems, conquer recursively, combine; cost captured by recurrences solved with the Master Theorem.
Key idea: a correct recursion needs a base case that always terminates and a recursive step that strictly shrinks the problem toward it.
Session 8Recursive algorithms (II)

Binary search uses Divide and Conquer to efficiently look up elements in a sorted collection by halving the search interval each step; implement it for any collection of data.

  • Binary search — compare to the midpoint and discard half the range each step; O(log n) on sorted input.
  • Generalizing — the same halving idea applies to any monotonic predicate, not just equality lookup.
binary search O(log n) requires sorted input
Invariant: the target, if present, always lies within the current [lo, hi] window — every iteration preserves this while halving the window.
Binary search demo
Session 9Recursive Sorting (I)

Dives deeper into Quicksort — another example of Divide and Conquer, used to sort a collection of linear data by partitioning around a pivot and recursing on each side.

  • Quicksort — choose a pivot, partition smaller/larger elements around it, recurse; in-place with small constants.
  • Pivots — average O(n log n), but a poor pivot degrades to O(n²); randomisation mitigates this.
avg O(n log n) worst O(n²) space O(log n)
Invariant: after partitioning, the pivot sits in its final sorted position — everything left is ≤ it, everything right is ≥ it.
Sorting race demo
Session 10Recursive sorting (II)

Merge Sort as a good alternative to Quicksort for Divide-and-Conquer sorting; recursively split the list in half, sort each half, and merge the two sorted halves. Understand the differences and when to use each.

  • Merge Sort — guaranteed O(n log n) and stable, but needs O(n) auxiliary space.
  • Merge Sort vs. Quicksort — merge sort for stability/guaranteed bounds & linked lists; quicksort for in-place speed on arrays.
merge sort O(n log n) stable yes space O(n)
Key idea: merging two already-sorted lists is linear — that single fact is what turns recursive halving into an O(n log n) sort.
Sorting race demo
Cormen — Ch. 2, 7, 8Grokking — Ch. 3–4Cormen Ch. 7 covers quicksort & randomisation, Ch. 8 the sorting lower bound; Grokking Ch. 4 motivates divide-and-conquer.
Module 3 Linear data structures sessions 11–14 · stacks, queues, multidimensional arrays

Having mastered raw arrays and lists, this module layers abstract data types on top of them. Stacks and queues constrain access order to make certain problems trivial, and multidimensional arrays generalise indexing to grids and matrices. The module closes the first assessable block with a timed Continuous Evaluation over modules 2–3.

Learning outcomes
  • Implement stacks and queues over arrays and linked lists with O(1) core operations.
  • Select LIFO vs. FIFO discipline to match a problem's ordering requirements.
  • Reason about row-major memory layout and access cost for 2-D and n-D arrays.
  • Solve combined linear-structure problems under time pressure.
Session 11Stacks and Queues

Linear structures built on top of arrays and linked lists that impose ordering restrictions, useful when insertion order affects extraction order. They expose a deliberately narrow interface so the discipline is guaranteed.

  • Stack (LIFO) — last-in, first-out; push/pop/peek in O(1). Drives recursion, undo, and expression evaluation.
  • Queue (FIFO) — first-in, first-out; enqueue/dequeue in O(1). Drives scheduling and breadth-first traversal.
push / pop O(1) enqueue / dequeue O(1)
Key idea: restricting where you may add and remove is a feature — it makes the structure's behaviour predictable and the matching algorithm simple.
Session 12Practice session: Linear Data Structurespractice

Solve more complex problems combining the techniques and data structures learned so far, with instructor guidance and student-proposed problems.

  • Combined linear-structure problems — e.g. balanced-bracket checking, sliding windows, and using a stack/queue inside a larger algorithm.
Key idea: real problems rarely name the structure they need — recognising "this is a stack problem" is half the solution.
Session 13Multidimensional Arrays

Arrays with more than one dimension; how they are stored in memory (typically row-major, flattened into one contiguous block) and the efficiency of typical read/update operations.

  • Memory layout — multidimensional indices mapped to one linear offset; row-major vs. column-major and its effect on cache behaviour.
  • Read/update efficiency — element access stays O(1); iteration order matters for performance. Use cases: matrices, grids, images, game boards.
Key idea: a 2-D array is a 1-D array in disguise — iterating in storage order keeps memory accesses contiguous and fast.
Session 14Practice Test — Continuous Evaluation (I)evaluation

A coding task to complete in 80 minutes, covering all material from modules 2 and 3 (sorting, searching, recursion, arrays, lists, stacks, queues).

  • Solved individually during class time.
  • Graded on correctness and performance — both that it works and that it meets the expected complexity.
Module 4 Unordered data structures session 15 · hashing

A short but pivotal module: it leaves ordered, position-based structures behind and introduces hashing, which trades ordering for near-constant-time lookup. The hash table underpins sets, dictionaries and caches and is one of the most-used structures in practice.

Learning outcomes
  • Explain what makes a good hash function (uniform, fast, deterministic).
  • Describe collision-resolution strategies (chaining, open addressing) and the role of load factor.
  • Reason about average O(1) vs. worst-case O(n) hash-table operations.
Session 15Hashtables

Entering non-linear data structures: hashtables enable fast item retrieval based on hash functions, which map a key to a bucket index so insert, lookup and delete avoid scanning the whole collection.

  • Hash functions — deterministic maps from keys to indices that should spread keys uniformly across buckets.
  • Collisions — distinct keys landing in the same bucket, resolved by chaining (lists per bucket) or open addressing (probing); load factor governs performance.
lookup avg O(1) lookup worst O(n) space O(n)
Key idea: a hash table buys O(1) average access by giving up order — you can find a key fast, but you cannot ask for "the next largest".
Hash table demo
Module 5 Tree-like data structures sessions 16–20 · trees, traversal, BSTs, heaps

Trees are the first hierarchical (non-linear) structures: a root branching into children, with no cycles. The module covers how to lay a tree out, the two canonical ways to visit every node (BFS and DFS), the ordered Binary Search Tree, and the heap — a tree tuned for always retrieving the highest-priority element. These structures power search, scheduling and the pathfinding to come in module 6.

Learning outcomes
  • Describe tree terminology (root, parent, child, leaf, depth, height).
  • Implement breadth-first and depth-first traversal and choose between them.
  • Build a Binary Search Tree and reason about why balance determines its cost.
  • Use a heap / priority queue to retrieve extreme elements efficiently.
Session 16Tree Data Structures (I)

Trees as graph-like structures (a connected, acyclic graph with a root): how a tree is arranged and how an algorithm visits all its nodes recursively.

  • Tree anatomy — root, parent/child, leaves, subtrees, depth and height; the recursive definition of a tree.
  • Traversal — visiting every node exactly once in O(n); pre-/in-/post-order variants of depth-first walking.
traversal O(n)
Key idea: a tree is defined recursively — each child is itself the root of a subtree — so most tree algorithms are naturally recursive.
Session 17Tree Data Structures (II)

Breadth First and Depth First, the most common traversal techniques; implement both and know when to use each. BFS explores level by level; DFS dives down one branch before backtracking.

  • Breadth First Search (BFS) — level-order using a queue; finds the shallowest/closest node first.
  • Depth First Search (DFS) — explore deep first using a stack or recursion; natural for full enumeration and detecting structure.
BFS / DFS O(n) BFS uses queue DFS uses stack
Key idea: BFS and DFS differ only in the structure that holds the frontier — swap a queue for a stack and the same loop changes its exploration order.
BFS / DFS traversal demo
Session 18Tree Data Structures (III)

A deeper look at a commonly used tree: the Binary Search Tree, which keeps elements ordered so search mirrors binary search.

  • BST ordering invariant — every key in the left subtree < node < every key in the right subtree.
  • Operations — search, insert and delete in O(h) where h is height: O(log n) if balanced, O(n) if degenerate.
balanced O(log n) degenerate O(n)
Invariant: an in-order traversal of a BST yields its keys in sorted order — that single property is what makes search logarithmic when the tree stays balanced.
Session 19Practice Session: Tree Data Structurespractice

Entirely dedicated to problems where trees are the right data structure, with instructor guidance and student-proposed problems.

  • Tree-based problem solving — traversal, height/balance checks, and recursive divide-and-conquer over tree shapes.
Key idea: when a problem has nested or hierarchical structure, modelling it as a tree often turns a hard loop into a clean recursion.
Session 20Heaps and Priority Queues

Tree-like structures where items are arranged by priority or weight; a (binary) heap keeps the highest- or lowest-priority element at the root for instant access. How they work and when to use them.

  • Heap property — every parent dominates its children (max-heap or min-heap); stored compactly in an array.
  • Priority queue — insert and extract-min/max in O(log n), peek in O(1); the engine behind Dijkstra and scheduling.
insert O(log n) extract O(log n) peek O(1)
Key idea: a heap doesn't fully sort — it keeps just enough order to surface the next-most-important element cheaply, which is all a priority queue needs.
Module 6 Graphs sessions 21–24 · traversal, shortest paths, cycles, topological sort

Graphs generalise trees by allowing any node to relate to any other, with edges that may be directed and/or weighted — the natural model for maps, networks, dependencies and game states. The module covers traversal, the two flagship shortest-path algorithms (Dijkstra and Bellman-Ford), and DFS-based techniques for cycle detection and ordering dependencies. It closes with the second Continuous Evaluation spanning modules 4–6.

Learning outcomes
  • Represent graphs as adjacency lists/matrices and choose by density.
  • Apply BFS/DFS to connectivity, reachability and cycle detection.
  • Compute shortest paths with Dijkstra and know when Bellman-Ford is required.
  • Produce a topological order of a Directed Acyclic Graph.
Session 21Graphs (I)

Graphs hold many (possibly directional and/or weighted) relations among elements. What a graph is, what problems it suits, how to represent and traverse it, and how to find the shortest path between two nodes.

  • Graph definitions — vertices and edges; directed vs. undirected, weighted vs. unweighted; adjacency list (sparse) vs. matrix (dense).
  • Traversal & shortest path — BFS gives the fewest-edges path on unweighted graphs.
  • Dijkstra's algorithm — greedy single-source shortest path on non-negative weights using a priority queue.
Dijkstra O((V+E) log V) BFS O(V+E) needs weights ≥ 0
Key idea: Dijkstra repeatedly settles the closest unvisited node — once a node is settled its shortest distance is final, which is exactly why negative edges break it.
Pathfinding demo (BFS / Dijkstra / A*)
Session 22Graphs (II) — Bellman-Ford, cycles & topological sort

Dijkstra's limitations (it fails with negative-weight edges) and how algorithms like Bellman-Ford come to the rescue by relaxing every edge repeatedly. Plus two DFS-based tools for directed graphs.

  • Bellman-Ford — relax all edges V−1 times; handles negative weights and detects negative cycles.
  • Cycle detection — using Depth First search and node colouring / recursion-stack tracking.
  • Topological sort — a linear ordering of a DAG so every edge points forward; the basis of dependency resolution and scheduling.
Bellman-Ford O(V·E) topo sort O(V+E) handles negative edges
Key idea: Bellman-Ford trades speed for generality — it is slower than Dijkstra but works where Dijkstra cannot, and a still-improving edge after V−1 passes proves a negative cycle.
Pathfinding demo
Session 23Practice Session: Graphspractice

Entirely dedicated to problems where graphs are the right data structure, with instructor guidance and student-proposed problems.

  • Graph-based problem solving — modelling a problem as nodes and edges, then picking the right traversal or shortest-path tool.
Key idea: the hard part of graph problems is usually the modelling — once "states" become nodes and "moves" become edges, a standard algorithm finishes the job.
Session 24Practice Test — Continuous Evaluation: Graph-like Data Structuresevaluation

A coding task to complete in 80 minutes, covering all material from modules 4, 5 and 6 (hashing, trees, heaps, graphs).

  • Solved individually during class time.
  • Graded on correctness and performance.
Module 7 Dynamic Programming and Greedy Algorithms sessions 25–30 · strategies, presentations & final exam

The final module steps up from data structures to high-level algorithm design strategies for hard optimisation problems: greedy methods that commit to a locally best choice, and dynamic programming that systematically reuses subproblem answers. It also introduces the idea of intractability (NP-completeness) and approximation. The term ends with group presentations, the last Continuous Evaluation, and the comprehensive final exam.

Learning outcomes
  • Recognise when a greedy choice is provably optimal versus only approximate.
  • Identify NP-complete problems and the role of approximation algorithms.
  • Spot overlapping subproblems and optimal substructure and design a DP solution.
  • Implement DP both top-down (memoization) and bottom-up (tabulation).
Session 25Greedy Algorithms

Tackling the "impossible" — problems with no known fast (polynomial) solution, the NP-complete class. Greedy algorithms make the locally optimal choice at each step; for hard problems, approximation algorithms trade exactness for speed.

  • Greedy strategy — commit to the best immediate choice; optimal only when the problem has the greedy-choice property and optimal substructure.
  • NP-complete problems — no known polynomial algorithm; verifying a solution is easy but finding one seems exponential.
  • Approximation algorithms — fast methods that return a provably near-optimal answer.
greedy step often O(n log n) NP-complete brute force O(2ⁿ)
Key idea: greedy is fast and simple but only correct when a local optimum is guaranteed to be part of a global optimum — otherwise it gives an approximation, not the answer.
Backtracking — N-Queens demo
Session 26Dynamic Programming

Solving complex problems by breaking them into simpler subproblems, solving each once, and storing the results for reuse — turning exponential recomputation into polynomial work.

  • Overlapping subproblems — the same subproblems recur, so caching (memoization) avoids recomputation.
  • Optimal substructure — an optimal solution is composed of optimal solutions to its subproblems.
  • Top-down vs. bottom-up — recursion with a memo table vs. iterative tabulation; e.g. Fibonacci O(2ⁿ)O(n), 0/1 knapsack in O(nW).
Fibonacci DP O(n) 0/1 knapsack O(nW)
Key idea: DP is "recursion plus memory" — if a brute-force recursion keeps re-solving the same subproblems, caching their answers collapses the cost dramatically.
DP — Fibonacci memoization demo 0/1 Knapsack DP table demo
Session 27Groupwork Presentations (I)practice

The first half of the groups give 10–15 minute presentations of their board-game results, defending their engineering choices to the class.

  • Why they chose the board game
  • What algorithms they used and why
  • What data structures they used and why
  • What problems they hit and how they solved them
Key idea: being able to justify why a structure or algorithm fits a problem is the real learning outcome — the same skill graded in the final exam.
Session 28Groupwork Presentations (II)practice

The remaining half of the groups give their 10–15 minute presentations on the same four points (board-game choice, algorithms, data structures, and problems solved).

  • Board-game choice, algorithms, data structures and problems solved
Session 29Practice Test — Continuous Evaluation: Greedy & Dynamic Programmingevaluation

A coding task to complete in 80 minutes, covering all material from module 7 (greedy and dynamic programming).

  • Solved individually during class time.
  • Graded on correctness and performance.
Session 30Final Examevaluation

A test exercising understanding of all topics covered from session 1 to session 26 — both theoretical and practical questions.

  • Comprehensive theory + practice across all seven modules.
  • Covers sessions 1–26 (presentations and CE sessions are assessed separately).

Key concepts

A quick reference to the vocabulary used throughout the program — complexity classes, structures and strategies.

Algorithm — a finite, well-defined procedure that maps an input to an output; correctness and efficiency are judged separately.
Data structure — a way of organising data in memory to make particular operations efficient.
Asymptotic notation — describes how cost grows with input size, ignoring constants: Big-O (upper), Ω (lower), Θ (tight).
Constant time — O(1) — cost independent of input size (e.g. array index, hash lookup average).
Logarithmic — O(log n) — cost grows by a constant each time n doubles (e.g. binary search).
Linear — O(n) — cost proportional to input size (e.g. a single scan).
Linearithmic — O(n log n) — the bound of efficient comparison sorts (merge/quick sort).
Quadratic — O(n²) — cost grows with the square of n (e.g. bubble/insertion sort).
Exponential — O(2ⁿ) — cost doubles with each added element; brute-force search of hard problems.
Divide and conquer — split a problem into subproblems, solve recursively, and combine (merge sort, quicksort, binary search).
Recursion — a procedure defined in terms of smaller instances of itself, with a base case that guarantees termination.
Stable sort — preserves the relative order of equal keys (merge sort is stable; quicksort generally is not).
Stack (LIFO) — last-in, first-out access; powers recursion, undo and DFS.
Queue (FIFO) — first-in, first-out access; powers scheduling and BFS.
Hash table — key-to-bucket mapping giving average O(1) lookup; collisions resolved by chaining or probing.
Binary Search Tree — ordered tree where left < node < right; operations are O(h) in the height.
Heap / priority queue — tree keeping the highest-priority element at the root; insert/extract in O(log n).
Graph — vertices joined by edges that may be directed and/or weighted; models networks and relations.
BFS / DFS — breadth-first (level order, queue) and depth-first (deep first, stack) graph/tree traversals.
Dijkstra's algorithm — single-source shortest paths on non-negative-weight graphs using a priority queue.
Bellman-Ford — shortest paths that tolerate negative weights and detect negative cycles, at higher cost.
Topological sort — a linear ordering of a DAG so every edge points forward; used for dependency resolution.
Greedy algorithm — makes the locally optimal choice at each step; optimal only with the greedy-choice property.
Dynamic programming — solving problems with overlapping subproblems and optimal substructure by caching subresults.
NP-complete — problems with no known polynomial algorithm but whose solutions are quickly verifiable.
Loop invariant — a condition true before and after every loop iteration; the standard tool for proving correctness.

Bibliography

Recommended reading, annotated with how each text supports the course.

Cormen, Leiserson, Rivest & Stein. Introduction to Algorithms. ISBN 9780262033848 (Digital) The rigorous, comprehensive reference ("CLRS") with formal proofs and complexity analysis — the spine of the course. Use throughout · esp. sessions 2 (analysis), 7–10 (recursion & sorting), 16–24 (trees & graphs), 25–26 (greedy & DP).
Aditya Y. Bhargava. Grokking Algorithms. ISBN 9781617292230 (Digital) A friendly, illustrated introduction — ideal for first intuition before the formal treatment in CLRS. Use for sessions 2 (Big-O), 4–10 (sorting/search & divide-and-conquer), 21–22 (graphs), 26 (DP).
Donald Knuth. The Art of Computer Programming. ISBN 9780201896831 (Digital) The classic deep-dive reference for advanced study and the mathematical foundations of algorithms. Optional depth · sorting & searching internals (sessions 4–10) and analysis foundations.