Interactive Course

Data Structures

The fundamental toolkit for the aspiring computer scientist or programmer.



The way we store and manipulate data with computers is a core part of computer science. In Computer Science Fundamentals, you'll start with the basics, like arrays and sorting, and build up to more complex data types and data structures.

By the end of this course, you’ll have discovered algorithms that can be used to store data quickly, rearrange it efficiently, and access it easily.

Topics covered

  • Big-O notation
  • Insertion sort
  • Stacks
  • Queues
  • Binary search trees
  • Red-black trees
  • Priority queues
  • Heaps
  • Heapsort
  • Treaps

Interactive quizzes


Concepts and exercises


Course map

Prerequisites and Next Steps

  1. 1

    Intro to Algorithms

    Learn how to store and manipulate data to efficiently answer questions.

    1. Arrays

      Arrays are one of the most fundamental data structures in computing.

    2. Searching

      Arrays are collections of data. You search when you want to know what's in the collection.

    3. Insertion Sort

      Transform an array into a sorted array with this classic algorithm.

    4. The Speed of Algorithms

      How fast does an algorithm run? Use the language computer scientists use to answer this question!

  2. 2


    We need to go deeper - with this tool for efficiency and elegance in programming.

    1. Recursion

      Recursion is a concept found in both nature and computer science.

    2. Divide and Conquer

      We can solve problems in powerful ways by splitting them into pieces first.

    3. Mergesort

      What's easier than sorting one big sequence? Creating a sorted sequence from two smaller sorted sequences!

    4. Quicksort

      Quicksort, like Mergesort, uses the divide-and-conquer strategy to quickly sort arrays.

    5. Linked List

      Linked lists are a recursive data structure that can be used to implement stacks and queues.

  3. 3

    Stacks and Queues

    One thing after another.

    1. Stacks

      Arrange information in a computer the same way you arrange books on your desk.

    2. Queues

      Many algorithms are like grocery stores: more orderly when everyone waits their turn in line.

  4. 4

    Binary Trees

    A look at trees (and search trees) in our quest for superior data structures.

    1. Binary Trees

      Binary trees are a fundamental tool for flexibly organizing data.

    2. Traversals

      There are many ways to work your way through a binary tree.

    3. Binary Search Trees

      Binary trees make data easy to store and fast to locate.

    4. Tree Rotations

      To keep a binary tree balanced, you'll often need to rotate some nodes around.

    5. Red Black Trees

      Learn a powerful technique for making sure your search trees stay balanced.

  5. 5


    A clever, efficient data structure for data types like priority queues.

    1. Priority Queues

      A stack or a queue won't help if you need the most important thing first. Priority queues come to the rescue!

    2. Binary Heaps

      Heaps implement priority queues by bringing the important things to the top of a binary tree.

    3. Heapsort

      This important sorting algorithm uses a priority queue to sort an array.

    4. Treaps

      Take a page from heaps to easily keep your binary search trees balanced.