Data Structures and Algorithms Course

Free online course · 10 lessons

Analyze algorithms with Big-O and implement the core data structures and algorithms: linear structures, sorting, hashing, trees, heaps, graph traversal, shortest paths and dynamic programming. After the course you can pick the right structure for a problem and justify its cost.

By Studeli

Start with lesson 1

What you will learn in 10 lessons

Every lesson includes all nine study tools

  • Study Guide
  • Summary
  • Walkthroughs
  • Practice Questions
  • Flashcards
  • Explain It
  • Key Terms
  • Cheat Sheet
  • Concept Map
  1. Big-O Notation

    Start here

    Analyze the running time and memory use of algorithms with Big-O, Big-Omega and Big-Theta notation, and compare common growth rates.

    6 learning goals
    1. 1.Measure the cost of an algorithm
    2. 2.Describe growth with asymptotic notation
    3. 3.Compare common growth rates
    4. 4.Analyze loops and complete functions
    5. 5.Analyze memory use
    6. 6.Explain amortized cost
  2. Solve problems recursively by defining base and recursive cases, trace the call stack and analyze simple recursive algorithms.

    5 learning goals
    1. 1.Build recursive solutions from base cases and recursive cases
    2. 2.Trace and analyze recursive calls
    3. 3.Solve problems on strings and lists recursively
    4. 4.Solve problems with divide and conquer
    5. 5.Choose between recursion, iteration and memoization
  3. Implement and compare dynamic arrays, linked lists, stacks, queues and deques, and choose the right one for an access pattern.

    5 learning goals
    1. 1.Describe data structures through abstract data types and memory
    2. 2.Build and analyze arrays that grow
    3. 3.Build linked lists and update their links safely
    4. 4.Use stacks, queues and deques to solve problems
    5. 5.Choose and justify the right linear structure
  4. Implement linear and binary search and the main comparison and linear-time sorting algorithms, and compare their costs and stability.

    5 learning goals
    1. 1.Find items with linear and binary search
    2. 2.Sort with simple methods and judge any sorting algorithm
    3. 3.Sort in n log n time with divide and conquer
    4. 4.Know the limit of comparison sorting and sort integers in linear time
    5. 5.Compare sorting and searching methods and choose the right one
  5. Explain how hash functions and collision resolution give fast average-case lookups, and use hash-based sets and maps effectively.

    5 learning goals
    1. 1.Explain how hashing gives fast lookups
    2. 2.Resolve collisions with separate chaining
    3. 3.Resolve collisions with open addressing
    4. 4.Keep a hash table fast as it grows
    5. 5.Use hash-based sets and maps effectively
  6. Represent hierarchical data with trees, traverse them in several orders and insert, find and delete keys in binary search trees and balanced trees.

    5 learning goals
    1. 1.Describe hierarchical data with trees
    2. 2.Traverse trees in depth-first and level order
    3. 3.Search, insert and delete keys in binary search trees
    4. 4.Keep binary search trees balanced with AVL rotations
    5. 5.Use search trees as ordered maps
  7. Implement a priority queue with a binary heap, build a heap in linear time and use heaps for sorting and scheduling problems.

    5 learning goals
    1. 1.Explain what a priority queue does and how it can be built
    2. 2.Represent a binary heap as an array
    3. 3.Keep a heap in order as it changes
    4. 4.Build a heap in linear time and sort with it
    5. 5.Solve top-k, merging and scheduling problems with heaps
  8. Represent graphs with adjacency lists and matrices, and solve connectivity, reachability and ordering problems with breadth-first and depth-first search.

    5 learning goals
    1. 1.Describe graphs and store them in a program
    2. 2.Search a graph with breadth-first search
    3. 3.Explore a graph with depth-first search
    4. 4.Solve connectivity and reachability problems
    5. 5.Detect cycles and order dependencies
  9. Find shortest paths in weighted graphs with DAG relaxation, Dijkstra's algorithm and Bellman–Ford, and explain when each one applies.

    5 learning goals
    1. 1.Model weighted graphs and define shortest paths
    2. 2.Find shortest and longest paths in directed acyclic graphs
    3. 3.Compute shortest paths with Dijkstra's algorithm
    4. 4.Handle negative weights with Bellman–Ford
    5. 5.Compute all-pairs distances and apply shortest paths to routing
  10. Solve optimization and counting problems with dynamic programming by defining subproblems, writing recurrences and building solutions bottom-up or with memoization.

    5 learning goals
    1. 1.Recognize when dynamic programming helps
    2. 2.Implement dynamic programming top-down and bottom-up
    3. 3.Design subproblems and recurrences for new problems
    4. 4.Find the longest common subsequence of two sequences
    5. 5.Solve subset sum and knapsack problems

What to take next

More Programming courses

Make your own Study Materials

Turn your notes, slides and documents into Study Guides, Practice Questions, Flashcards and 6 more tools.

Get Started