Skip to content

StructuredCS/algorithm-analysis-deep-dive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Analysis Deep Dive

Course Cover

Table of Contents

📘 Course Overview

Algorithm Analysis Deep Dive began as a part of a flipped classroom experience designed for university students (more about me). As the lectures went online, I realized they were helping a much wider audience — especially self-taught programmers and bootcamp graduates who never had the chance to study algorithm analysis rigorously. That's why I've decided to open access the course, and share the full learning experience.

This is not just a coding tutorial — it's a full university-level learning experience in algorithm and data structure analysis, a topic often glossed over in bootcamps and self-study resources, and one that AI tools like ChatGPT frequently struggle to explain accurately. The course emphasizes understanding why algorithms work, not just how to implement them, with a strong focus on deriving and reasoning about time complexity.

The course is organized into weekly modules of eight weeks. Each week includes curated lecture videos, quizzes, and hands-on coding labs with automated feedback. You can:

If you find this course helpful, consider giving this repo a star ⭐️, sharing it with your network, and subscribing to @StructuredCS on YouTube. Your support helps more learners discover quality, accessible resources.

🧠 Who This Course Is For

This course is designed for anyone who wants to deepen their understanding of algorithm analysis and time complexity. It's particularly useful for:

  • Self-taught programmers looking to fill gaps in algorithm analysis
  • Bootcamp graduates who want to go beyond surface-level DSA
  • Students preparing for coding interviews who struggle with complexity analysis
  • Students who've taken an algorithms course before but found the math abstract, non-intuitive, or disconnected from the actual code
  • Anyone who's tried to memorize time complexity by brute force — and now wants to truly understand it

The prerequisites are minimal:

  • a basic understanding of programming concepts
  • a basic understanding of linear data structures, such as arrays and linked lists
  • a basic understanding of recursion and iteration
  • a basic understanding of at least one programming language (Java, Python, C++, etc.)

🎯 What You'll Learn

By the end of this course, you will have a solid understanding of:

  • Core mathematical tools: asymptotic notation, recurrence tree method, substitution method, and the master theorem
  • Complexity analysis techniques: worst-case, average-case, probabilistic, and amortized analysis
  • Sorting algorithms: insertion sort, quicksort, mergesort, heapsort
  • Data structures: heaps, hashtables, and binary search trees
  • The divide-and-conquer paradigm and how to analyze its time complexity
  • How to analyze the time complexity of algorithms using mathematical reasoning
  • How to analyze the time complexity of data structures

🧩 Why It Still Matters to Learn Algorithm Analysis

As AI tools like ChatGPT become more prevalent, you may wonder if you can rely on AI to handle algorithm analysis for you. While AI tools can be a helpful tool, these tools often struggle with the nuances of time complexity, and give incorrect or incomplete answers & explanations. Here is an example where Google AI Overview fails to parse a correct statement about the time complexity of heap operations:

A statement that's true: In the average case, a heap allows insertion in O(1) time and deletion of the highest-priority element (e.g., the min value in a min heap) in O(log⁡n) time.

AI overview sample snapshot

🧪 Weekly Content & Interactive Assignments

This course is more than just lectures — it's a full learning experience designed to help you apply what you've learned and get feedback automatically, just like a structured university course. The course is structured to be language-agnostic. Each week comes with:

  • A set of lecture videos (YouTube playlist)
  • One or more conceptual assignments or quizzes
  • Hands-on coding labs where you'll write and test algorithms

Labs use GitHub, Github Actions and GitHub Classroom, where you'll:

  • Submit your code via version control
  • Receive immediate automated feedback via GitHub Actions
  • Learn through test-driven development
  • You don't need to be enrolled anywhere — just a GitHub account is enough to participate.

The current lab setup is designed for Java. The setups for other languages are in the works, and they will be added when ready.

Week Topic Videos Assignments
Week 1 Introduction to algorithms Best & Worst Case Analysis Explained Quiz 1
Step-by-Step Analysis of Insertion Sort Problem 1
Lab 1
Week 2 Asymptotics Asymptotic Analysis Explained Quiz 2
Assignment 1
Week 3 Divide and conquer Recurrence Relations &
Recurrence Tree Method
Quiz 3
Master Theorem Explained with Examples Problem 2
Week 4 Quick sort and
probability analysis
Understanding Quicksort Quiz 4
Average-Case Complexity, Expected
Value & Randomized Quicksort
Problem 3-5
Lab 2
Assignment 2
Week 5 Heaps Understanding Heap Properties Quiz 5
Insert & Peek Methods Explained Quiz 6
Delete Method Explained Problem 6
Building a Heap & Mastering Heap Sort Lab 3
Week 6 Hashtables How Hash Functions Work Quiz 7
Understanding Open Addressing Problem 7
Understanding Chaining Lab 4
Week 7 Binary search trees Search Operation &
Time Complexity Explained
Quiz 8
The Insert Method Explained Problem 8
The Delete Method Explained Assignment 3
Traversal Lab 5
Week 8 Amortized analysis Aggregate Method Explained with Examples Quiz 9
Accounting Method Explained with Examples
Potential Method Explained with Examples

The answers and sample solutions for the quizzes and writing assignments are provided in the answers.md file for your reference. Please try to solve each question on your own before looking at the answers.

💬 Join the Discussion

If you're working through the labs or lectures and want to discuss challenges, ideas, or solutions with others:

🙌 Stay Connected & Support the Course

If you find this course helpful, consider giving this repo a star ⭐️, sharing it with your network, and subscribing to @StructuredCS on YouTube. Your support helps more learners discover quality, accessible resources. A like, a share, or a comment goes a long way. If you know someone who might benefit from this course — a fellow learner, colleague, or friend preparing for interviews — feel free to share the playlist or this GitHub repo with them.

📜 License & Attribution

This course is licensed under the MIT License. Feel free to use, modify, and share the content as long as you provide appropriate credit. The course materials come from various sources, including my own lectures and resources from other educators. I have made every effort to credit the original authors and sources of the materials used in this course. If you notice any omissions or errors, please let me know so I can correct them. The materials are provided for educational purposes only, and I encourage you to adapt them for your own learning or teaching purposes.

About

An open-access course on algorithm analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published