Winda

Berkeley CS61A: Structure and Interpretation of Computer Programs

Contents · 60

  1. 01-WelcomeIntroduces CS 61A’s goals, teaching staff, learning resources, labs, discussions, problem-solving practice, AI use, and collaboration policies.
  2. 02-FunctionsIntroduction to UC Berkeley’s CS 61A and Data C88C video lectures, explaining how to use them before live lectures.
  3. 02-FunctionsExplains assignment statements, expression evaluation, frames and environments, function calls, and problem-solving with small expressions.
  4. 03-ControlExplains printing versus returning values, conditional and Boolean expressions, while loops, and prime factorization.
  5. 03-ControlExplains function definitions and calls, argument binding, return values, frames, and how environments determine the meaning of names.
  6. 04-Higher-Order FunctionsCovers Boolean evaluation, function design, functions as values, and higher-order functions such as summation, function composition, and closures.
  7. 04-Higher-Order FunctionsComputing Fibonacci numbers with a while loop by tracking the current and previous values and sequence index.
  8. 05-EnvironmentsAnalyzes nested print and `or` evaluation, perfect-number classification with iteration, and environment diagrams for higher-order and nested functions.
  9. 05-EnvironmentsHow higher-order functions pass functions as arguments and how environment diagrams track their execution.
  10. 06-AbstractionLambda expressions, function environments, currying, and higher-order functions with nested definitions and returns.
  11. 06-AbstractionHow lambda functions inherit parent frames, demonstrating lexical scoping and variable lookup in an environment diagram.
  12. 07-Function ExamplesReview Python exam topics including conditional expressions, truth values, environment diagrams, higher-order functions, and implementing a nearest-prime search.
  13. 07-Function ExamplesPython review examples on expression evaluation, print output, nested functions, enclosing scopes, and function return values
  14. 08-Midterm 1 ReviewFunctional abstraction practice with currying and argument reversal, plus digit-processing functions that test conditions across an integer’s digits and find the largest valid prefix.
  15. 09-RecursionRecursive functions, factorial evaluation, translating loops into recursion, and implementing a recursive Twenty-One game.
  16. 09-RecursionIntroduces recursion through digit summation, explaining base cases, recursive cases, and splitting numbers into their digits. It also discusses digit sums and credit-card checksums.
  17. 10-Tree RecursionIntroduces recursive problem-solving, mutual recursion, the Sevens game, and tree recursion through counting integer partitions.
  18. 10-Tree RecursionExplains recursive call order through a cascade function, tracing its output and call frames, and comparing two implementations.
  19. 11-SequencesPython sequences, list indexing and slicing, ranges, list comprehensions, stable partitioning, and recursive list algorithms.
  20. 11-SequencesPython lists, including literals, indexing, length, concatenation, repetition, and nested lists.
  21. 12-ContainersPython list indexing, slicing, comprehensions, recursion, and box-and-pointer diagrams, plus exercises on consecutive values and aggregation functions.
  22. 12-ContainersExplains box-and-pointer diagrams for lists, including nested lists, indexing, and primitive versus compound values.
  23. 13-ObjectsExplains dictionary comprehensions through a multiples example, then covers Python objects and data classes, recursive partition counting, and tracking state to enforce constraints.
  24. 13-ObjectsIntroduces Python objects and classes, attributes and methods, and how objects bundle data with related behavior.
  25. 14-Linked ListsIntroduces linked-list structure and construction, recursive and iterative processing, and a partition-generation example.
  26. 14-Linked ListsPython tuples: creation, indexing, slicing, dictionary keys, operations, unpacking, and returning multiple values.
  27. 15-TreesTree structure and abstraction, the Tree data class, and recursive algorithms for counting leaves, finding largest labels and path sums, and processing labels.
  28. 15-TreesIntroduces tree terminology and recursive relationships, then models trees in Python using a data class, leaf checks, and indented printing.
  29. 16-Midterm 2 ReviewReviews linked-list recursion, list iteration, index-based selection, and recursive counting of parking arrangements.
  30. 17-Problem SolvingIntroduces tree access and construction, recursive tree problem-solving, and a design process for counting nodes or paths that meet conditions.
  31. 18-MutationPython list creation and mutation, aliasing, recursion with mutable accumulators, and tree traversal problems.
  32. 18-MutationExplains mutation in lists and dictionaries, shared references, and how functions can change mutable objects.
  33. 19-ClassesIntroduces Python classes as user-defined types, including instances, attributes, methods, initialization, and the Student class; exercises cover grade retakes and creating students from discussion groups.
  34. 19-ClassesExplains object-oriented programming, including classes, objects, methods, local state, and Python lists as an example.
  35. 20-AttributesExplains Python attribute lookup, bound methods, chained dot expressions, object composition, and shared class attributes.
  36. 20-AttributesObject method calls, dot notation, and bound methods that retain their associated instance.
  37. 21-InheritanceClass attribute assignment, instance attribute lookup and linked history, mutual friendship tracking, and inheritance-based attribute lookup and method behavior.
  38. 21-InheritanceExplains Python inheritance, subclasses and base-class attribute lookup, with a checking account example that overrides interest and withdrawal behavior.
  39. 22-IteratorsPython iterators, lazy evaluation, map, filter, zip, reversed, and short-circuiting with all and any.
  40. 22-IteratorsPython iterators, using iter and next to traverse sequences, maintain independent positions, and signal exhaustion with StopIteration.
  41. 23-GeneratorsGenerator functions and iterator operations, including cycling sequences, yielding integers, and generating parking arrangements; also list mutation and aliasing practice.
  42. 23-GeneratorsExplains how generator functions yield values, how generator objects resume on each `next()` call, and how lazy evaluation supports efficient iteration.
  43. 24-EfficiencyRecursive Fibonacci computation, memoization, list operation efficiency, and generators for sequences, linked lists, and trees.
  44. 24-EfficiencyExplains measuring program efficiency by counting recursive Fibonacci calls and relating call growth to runtime.
  45. 25-Object ExamplesRecursive linked-list construction, filtering square sequences, and slicing linked lists.
  46. 25-Object ExamplesList mutation, aliasing, copying, slicing, and assignment, including how append, extend, pop, and remove affect lists.
  47. 26-Midterm 3 ReviewReviews Python lists and aliasing, recursive tree processing, string manipulation, and dictionary-based recursion through fruit-purchasing problems.
  48. 27-Functional ProgrammingIntroduces functional programming through Gleam, covering expressions, functions, pattern matching, higher-order functions, scope, immutability, recursion, and evaluation by substitution.
  49. 27-Functional ProgrammingIntroduces functional programming and Gleam’s pure functions, immutability, first-class functions, and expression-based control flow.
  50. 28-Algebraic Data TypesExplains Gleam’s linked-list structure, list literals and types, pattern matching, and processing with list functions, with examples for alternating, repeating, and prefix-matching lists.
  51. 28-Algebraic Data TypesExplains Gleam linked-list literals, homogeneous list types, standard list functions, and case-pattern matching with guards to inspect list contents.Explains Gleam list literals, shared tails, homogeneous types, list functions, and pattern matching with guards.
  52. 29-Immutable DataExplains Gleam pattern matching on multiple subjects and lists, building repeated lists, handling errors with Result, and calling external functions that may introduce mutation.
  53. 29-Immutable DataGleam’s Result type represents success or failure as values, requiring explicit handling of errors. Examples cover safe list access, custom errors, dictionary lookups, and inverting functions.
  54. 30-InterpretersGleam JavaScript foreign functions and mutable state, plus building an interpreter with expression parsing, values, environments, and evaluation.
  55. 30-InterpretersIntroduces parsing, static analysis, and program execution, then previews interpreters for arithmetic expressions and Gleam, including environments, functions, and values.
  56. 31-No Lecture (just videos)Explains lexical environments as linked frames, variable lookup with shadowing and unbound-variable errors, and extending local bindings for let expressions and pattern matches.
  57. 32-BrowsersExplains how browsers combine HTML, CSS, and JavaScript to render interactive pages, and covers events, built-in features, sandboxing, and accessibility.
  58. 33-TablesJoining tables on matching keys to combine related data, selecting specific columns, and sorting joined results.
  59. 34-SQLIntroduces relational tables and SQL as a declarative language, with an example query that filters, selects, and orders city data.
  60. 35-AggregationSQL aggregate functions such as MAX, MIN, SUM, and AVG summarize rows into a single result. Learn to combine aggregates correctly and calculate weighted averages from grouped data.