Back to all courses

Algorithm Fundamentals

How to make a computer do what you want, elegantly and efficiently.

An algorithm is a step-by-step process to achieve some outcome. When algorithms involve a large amount of input data, complex manipulation, or both, we need to construct clever algorithms that a computer can work through quickly.

By the end of this course, you’ll know methods to measure and compare performance, and you’ll have mastered the fundamental problems in algorithms.

Interactive
quizzes

22

Concepts and
exercises

255+
  1. 1

    Building Blocks

    The nuts and bolts of how computer scientists communicate algorithmic ideas.

    1. Pseudocode

      Start your study of algorithms by learning about this key aspect of how computer scientists communicate.

    2. Manipulating Numbers

      Most algorithms use commands that manipulate numbers with assignable variables.

    3. Repetition

      The ability to perform simple actions repeatedly is at the heart of every interesting algorithm.

    4. Arrays

      Arrays are critical for understanding algorithms that manipulate collections of information.

  2. 2

    Array Algorithms

    Master repetition through understanding algorithms that manipulate arrays.

    1. Included with
      Brilliant Premium

      Searching an Array

      Arrays can store lots of information. To find out what's there, you just have to look!

    2. Included with
      Brilliant Premium

      Binary Search

      Looking in the middle of a sorted array requires a bit of cleverness, but it can save you a lot of work.

    3. Included with
      Brilliant Premium

      Sorting an Array

      Sorting an array with the selection sort unlocks the power of binary search.

    4. Included with
      Brilliant Premium

      Insertion Sort

      There's more than one way to sort an array, and insertion sort is another classic algorithm for sorting.

  3. 3

    The Speed of Algorithms

    Part of the study of algorithms is learning to predict how fast or slow they run.

    1. Included with
      Brilliant Premium

      Timing Programs with a Stopwatch

      In science, sometimes the best thing to do is run an experiment!

    2. Included with
      Brilliant Premium

      Counting Operations

      Find out why computer scientists talk about "cost" instead of "time."

    3. Included with
      Brilliant Premium

      Best, Worst and Average Case

      Algorithms don't always have predictable costs. To prepare for the worst or hope for the best, you need to know what those are!

    4. Included with
      Brilliant Premium

      Comparing Algorithms

      Big-O notation is a simple notation that helps computer scientists compare algorithms and implementations.

  4. 4

    Stable Matching

    You now have the tools to understand and reason about important algorithms, including algorithms that can change the course of people's lives.

    1. Included with
      Brilliant Premium

      The Stable Matching Problem

      Discover a simple problem faced by every teaching hospitals and medical students every year.

    2. Included with
      Brilliant Premium

      Using Greediness

      An individual applicant can make the best decision with a greedy algorithm.

    3. Included with
      Brilliant Premium

      Deferred Acceptance Algorithm

      The Gale-Shapley algorithm uses individual greedy decisions to produce a global matching.

    4. Included with
      Brilliant Premium

      Correctness

      An algorithm for producing a stable matching is only good if it outputs a stable matching!