Lesson 1.2: Reasoning About Code Intro

Video Lesson:

Slides Annotated Slides Video
1.2-code_reasoning-vid-1221.pdf Download 1.2-code_reasoning-vid-1221.pdf PDF Download PDF

https://ubc.zoom.us/rec/play/0Jj71oZjEje_00Anz7-qf2OLiDdb4K-51NbcFp-o8b_HKKgN9rsjAEDWFqW2lzwXvGq5YjrDs0yTN3rE.qmY8DD9UtRRNYFYU Links to an external site.

Passcode: Pu5iq^#8


Readings:


Summary:

In this lesson we begin to look in detail at techniques for analyzing the running time of code. In particular, we define worst, average, and best case running time of an algorithm.


Learning Outcomes:

Upon completion off this lesson, students will be able to:

  • scrutinize a simple piece of C++ code and determine its functionality
  • understand the motivation for different perspectives from which we analyze running time
  • know which of the cases is typically selected for our analysis, and why
  • begin to speculate on a way of characterizing the running time of our sample function