Save this video — free

CS50 Fall 2025 - Lecture 3 - Algorithms (live, unedited)

CS50 · 2:32:55 · Watch on YouTube

CS50 Fall 2025 - Lecture 3 - Algorithms (live, unedited) Watch on YouTube →

Overview

CS50's Lecture 3 introduces fundamental algorithms, starting with a human-powered attendance count demonstrating linear and logarithmic time complexity. The lecture then delves into linear search (O(n)) and binary search (O(log n)) using "lockers" and "money" as metaphors, before explaining Big O notation for analyzing algorithm efficiency. It also covers selection sort, bubble sort (both O(n^2)), and the more efficient merge sort (O(n log n)), highlighting recursion as a powerful technique for solving complex problems like drawing Mario pyramids.

Key takeaways

Chapters

17:48 Introduction to Algorithms and Time Complexity
20:30 Human-Powered Attendance Algorithm
26:20 Analyzing Algorithm Efficiency: Linear vs. Logarithmic Growth
28:40 Understanding Arrays and Memory Access
34:50 Linear Search: Finding a $50 Bill
35:20 Binary Search: Leveraging Sorted Data
37:15 Pseudocode for Linear Search
38:30 Pseudocode for Binary Search
44:20 Big O Notation: Analyzing Running Time
48:20 Implementing Linear Search in C (Integers)
59:20 Implementing Linear Search in C (Strings)
1:09:10 Implementing a Phone Book with Structs in C
1:21:00 Analyzing Selection Sort
1:40:10 Analyzing Bubble Sort
1:49:00 Visualizing Sorting Algorithms
1:59:00 Introduction to Recursion
2:14:00 Merge Sort: Divide and Conquer

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, CS50.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.