<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>CS106B Programming Abstractions</title>
		<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/</link>
		<description>Recent content on CS106B Programming Abstractions</description>
		<generator>Hugo</generator>
		<language>en</language>
		
			<managingEditor>cbl@stanford.edu</managingEditor>
		
		
			<webMaster>cbl@stanford.edu</webMaster>
		
		
		
			<atom:link href="https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Welcome to CS106B!</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/0-namehash/</link>
				<pubDate>Tue, 22 Sep 2026 00:00:00 -0700</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/0-namehash/</guid>
				<description>&lt;div class=&#34;assignment-meta&#34;&gt;&#xA;    &lt;p&gt;&lt;strong&gt;Due Monday, September 28 at 11:59 pm Pacific (PDT, UTC-07:00)&lt;/strong&gt;&lt;/p&gt;&#xA;    &lt;ul&gt;&#xA;      &lt;li&gt;In this course, we express all date/times in Pacific time. Our Paperless submission system also displays/records due dates and submission times in Pacific time.&lt;/li&gt;&#xA;      &lt;li&gt;This assignment is to be completed &lt;b&gt;individually&lt;/b&gt;. Working in pairs/groups is not permitted.&lt;/li&gt;&#xA;    &lt;/ul&gt;&#xA;  &lt;/div&gt;&#xA;&lt;p&gt;Welcome to CS106B! This assignment is designed to help you get your development environment set up and running so that you can compile, run, and debug programs. There isn&amp;rsquo;t any actual programming involved, and we hope that this doesn&amp;rsquo;t take you too much time to complete.  Remember, you don&amp;rsquo;t need to understand what the code you&amp;rsquo;re being asked to run is actually doing just yet. Over the course of the quarter, each of the different parts of this program will be illuminated! This assignment must be completed &lt;strong&gt;individually&lt;/strong&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>About Assessments</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_assessments/</link>
				<pubDate>Sat, 03 Jan 2026 00:00:00 -0800</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_assessments/</guid>
				<description>&lt;p&gt;We know that you are working hard on completing your assignments and that this work forms the primary mechanism for learning and mastering concepts in CS106B. If, after completing an assignment, you have a solid and confident understanding of how and why your code works, you are on the right track toward a deep understanding of CS106B&amp;rsquo;s core concepts! Since assignments focus on specific topics throughout the course progression, it can be valuable to have additional summative opportunities to assess your learning and receive feedback on your progress.&lt;/p&gt;</description>
			</item>
			<item>
				<title>All IG Problems</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/all-ig-problems/</link>
				<pubDate>Fri, 21 Nov 2025 00:00:00 -0800</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/all-ig-problems/</guid>
				<description>&lt;p&gt;Here is a list of all the IG problems we&amp;rsquo;ve worked on in IGs throughout the quarter! We hope this is helpful in studying for the final.&lt;/p&gt;&#xA;&lt;h2 id=&#34;ig1-sumdigits&#34;&gt;IG1: &lt;code&gt;sumDigits()&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;em&gt;Topics: strings, transition to C++&lt;/em&gt;&lt;br&gt;&#xA;📦 &lt;a href=&#34;https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/code/IG1.zip&#34;&gt;Starter code&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Implement the &lt;code&gt;int sumDigits(string s)&lt;/code&gt; function from the code below:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;/* The sumDigits function returns the sum of all the digits in s.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   The function ignores negative numbers and only sums the individual&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   digits. For example, `sumDigits(&amp;#34;ab1c3d56--21x&amp;#34;)` should return `18` (which is `1 + 3 + 5 + 6 + 2 + 1`).&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   An empty string should return `0`. &#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;   You are welcome to use functions from the `cctype` and `strlib.h` libraries.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;*/&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;sumDigits&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// code here!&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;s&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;getLine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Enter a string with numbers and characters and punctuation, etc.: &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sum&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sumDigits&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;s&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;cout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;The sum of the digits in the string: &amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sum&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;endl&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Solution:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Midterm Review Advice 1</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/julieadvice/</link>
				<pubDate>Mon, 20 Oct 2025 00:00:00 -0700</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/julieadvice/</guid>
				<description>&lt;p&gt;This advice was written by Julie Zelenski for her CS106B/CS107 students preparing for a traditional timed exam. We hope you find the advice here to be helpful when preparing, even though we have some slightly different constraints on our diagnostic this quarter.&lt;/p&gt;&#xA;&lt;h2 id=&#34;philosophy&#34;&gt;Philosophy&lt;/h2&gt;&#xA;&lt;p&gt;First, a quote from Will Shortz, the crossword puzzle editor of the New York Times:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A crossword puzzle is a battle between the puzzle maker and editor on one side and the solver on the other. But unlike most battles, both sides here have the same goal &amp;ndash; for the solver to win. A perfect puzzle may put up lots of resistance. It may, in fact, seem impossible at first. Ideally, though, in the end the solver should triumph and think, Oh, how clever I am! &amp;ndash; Will Shortz, &lt;a href=&#34;https://mobile.nytimes.com/2001/04/08/magazine/endpaper-how-to-solve-the-new-york-times-crossword-puzzle.html&#34;&gt;How to solve&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Midterm Review Advice 2</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/keithadvice/</link>
				<pubDate>Mon, 20 Oct 2025 00:00:00 -0700</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/keithadvice/</guid>
				<description>&lt;p&gt;This advice was written by Keith Schwarz for his CS106B students preparing for a traditional timed exam. We hope you find the advice here to be helpful when preparing, even though we have some slightly different constraints on our diagnostic this quarter. Keep in mind that we &lt;em&gt;are&lt;/em&gt; providing you with a Qt Creator project, but that it isn&amp;rsquo;t going to be set up to compile and test your code. It is more for your familiarity and convenience.&lt;/p&gt;</description>
			</item>
			<item>
				<title>CS106B Late Policy</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/late_policy/</link>
				<pubDate>Sun, 21 Sep 2025 00:00:00 -0700</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/late_policy/</guid>
				<description>&lt;h3 id=&#34;late-assignment-policy&#34;&gt;Late Assignment Policy&lt;/h3&gt;&#xA;&lt;p&gt;The assignment deadline policy this quarter has been designed to provide all students with built-in flexibility. Here will be the general policy:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Assignments deadlines will fall at the end of the day in the Pacific time zone, i.e. 11:59pm GMT-7.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Preventative pro tip:&lt;/strong&gt; One way to avoid accidentally missing a deadline is to submit unfinished work as soon as it would earn some credit, and then re-submit as you improve upon it. Then if something happens like your laptop falls into Lake Lag an hour before the deadline (for this hypothetical, imagine Lake Lag has water), your assignment grade might be saved by a mostly correct solution that you had already submitted.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Assignments</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_assignments/</link>
				<pubDate>Mon, 01 Sep 2025 00:00:00 -0700</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_assignments/</guid>
				<description>&lt;p&gt;We have a great set of assignments planned to give you practice with the material presented in lecture and section. Programming is a skill best learned by doing and these assignments form an integral part of your experience in this course. These projects will be fun, challenging, illuminating, and rewarding. Your sincere efforts on the assignments will help you develop powerful skills and a deeper understanding of computational problem-solving.&lt;/p&gt;&#xA;&lt;h2 id=&#34;common-questions-about-assignments&#34;&gt;Common questions about assignments&lt;/h2&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;what-programming-environment-and-tools-are-used&#34;&gt;What programming environment and tools are used?&lt;/h3&gt;&#xA;&lt;p&gt;Programs are written in the C++ language and we use the Qt Creator IDE for editing, compiling, and debugging. Please visit the &lt;a href=&#34;https://web.stanford.edu/dept/cs_edu/resources/qt/&#34;&gt;Qt Installation Guide&lt;/a&gt; for install instructions.&lt;/p&gt;</description>
			</item>
			<item>
				<title></title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/midterm-practice-exam-solution/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assessments/midterm-practice-exam-solution/</guid>
				<description>&lt;h1 id=&#34;practice-exam-solutions&#34;&gt;Practice Exam Solutions&lt;/h1&gt;&#xA;&lt;h2 id=&#34;q1-c-fundamentals&#34;&gt;Q1) C++ fundamentals&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;bool findFreeBlock(Grid&amp;lt;string&amp;gt;&amp;amp; seatGrid, int k, GridLocation&amp;amp; loc) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    for (int r = 0; r &amp;lt; seatGrid.numRows(); r++) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        int count = 0; // count of num consecutive empty seats in current row&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        for (int c = 0; c &amp;lt; seatGrid.numCols(); c++) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            if (seatGrid[r][c].empty()) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                count++;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                if (count == k) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    loc = { r, c - k + 1 };&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                    return true;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            } else {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                count = 0;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    return false;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;q2-adts&#34;&gt;Q2) ADTs&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;int reseatGroup(Grid&amp;lt;string&amp;gt;&amp;amp; seatGrid, Map&amp;lt;string, Set&amp;lt;GridLocation&amp;gt;&amp;gt;&amp;amp; reservationDB, string groupCode) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    // Start by &amp;#34;unlocking&amp;#34; the seat assignments from existing reservation&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Set&amp;lt;GridLocation&amp;gt; oldSeats = reservationDB[groupCode];&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    int k = oldSeats.size();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    for (GridLocation seat : oldSeats) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        seatGrid[seat] = &amp;#34;&amp;#34;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    GridLocation loc;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    if (findFreeBlock(seatGrid, k, loc)) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        // Update reservationDB with new block of seats&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        reservationDB[groupCode] = getSeatsForBlock(loc, k);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    // mark seat assignments (will restore old or set new)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    for (GridLocation seat : reservationDB[groupCode]) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        seatGrid[seat] = groupCode;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    // Take a set difference between seatsNow and oldSeats.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    // Elements that are in both will be removed.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Set&amp;lt;GridLocation&amp;gt; changedSeats = oldSeats.difference(reservationDB[groupCode]);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    return changedSeats.size();&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;q3-code-study-adts-and-big-o&#34;&gt;Q3) Code study: ADTs and Big-O&lt;/h2&gt;&#xA;&lt;p&gt;a) O(N&lt;sup&gt;2&lt;/sup&gt;)&lt;/p&gt;</description>
			</item>
			<item>
				<title>📅 CS106B Course Schedule</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/schedule/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/schedule/</guid>
				<description>&lt;p&gt;This is a preview of our planned schedule. The schedule may change as we go, and we will reflect those changes here.&lt;/p&gt;&#xA;&lt;hr/&gt;&#xA;&lt;div id=&#34;calendar-mount&#34;&gt;&lt;/div&gt;&#xA;&lt;script type=&#34;module&#34;&gt;&#xA;  import { renderScheduleFromMarkdown } from &#39;./js/schedule-from-md.js&#39;;&#xA;&#xA;  // Fetch the sibling markdown at runtime.&#xA;  // If your site baseURL or section path differs, adjust the URL accordingly.&#xA;  (async () =&gt; {&#xA;    // Since this page lives at /schedule/, the sibling file will be at /schedule/course-schedule.md&#xA;    const resp = await fetch(&#39;../course-schedule.md&#39;);&#xA;    if (!resp.ok) {&#xA;      console.error(&#39;Failed to fetch schedule markdown:&#39;, resp.status, resp.statusText);&#xA;      return;&#xA;    }&#xA;    const md = await resp.text();&#xA;    renderScheduleFromMarkdown(md, { mount: &#39;#calendar-mount&#39; });&#xA;  })();&#xA;&lt;/script&gt;</description>
			</item>
			<item>
				<title>About CS106B Programming Abstractions</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/page/about/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/page/about/</guid>
				<description>&lt;p&gt;This site is for CS106B&lt;/p&gt;</description>
			</item>
			<item>
				<title>ADT warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-warmup/</guid>
				<description>&lt;style&gt;&#xA;    .callout {&#xA;        background-color: #FFBF68;&#xA;        font-size: 90%;&#xA;    }&#xA;&lt;/style&gt;&#xA;&lt;img src=&#34;https://wizardzines.com/comics/better-at-debugging/better-at-debugging.png&#34; width=50%&gt;&#xA;&lt;p&gt;&lt;small&gt;&lt;a href=&#34;https://wizardzines.com/comics/better-at-debugging&#34;&gt;&amp;ldquo;How I got better at debugging&amp;rdquo; by Julia Evans&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&#xA;&lt;p&gt;For this course, you will write many C++ programs. But writing the code is only the first step; you also need strong skills in testing and debugging to bring a program to successful completion. Knowing your way around the debugger is key. Our assignments will feature warmup exercises that are designed to give you guided practice with the skills and tools for effective testing and debugging.&lt;/p&gt;</description>
			</item>
			<item>
				<title>At the ballot box</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-ballots/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-ballots/</guid>
				<description>&lt;p&gt;In 1887, French mathematician Joseph Bertrand pondered an idealized election conducted between two candidates, &lt;code&gt;A&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt;. Each voter casts a ballot for a single candidate and adds it to a sealed box. When the polls close, the box is shaken to mix up the order and ballots are removed one by one and tallied.  At the end of the tally, candidate &lt;code&gt;A&lt;/code&gt; has more votes than &lt;code&gt;B&lt;/code&gt; and wins the election.  Bertrand&amp;rsquo;s question was: What is the likelihood that the winning candidate &lt;code&gt;A&lt;/code&gt; is strictly ahead of candidate &lt;code&gt;B&lt;/code&gt; throughout the entire tally?&lt;/p&gt;</description>
			</item>
			<item>
				<title>Background on huffman coding</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman_background/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman_background/</guid>
				<description>&lt;p&gt;When I was an undergrad, my Mac had a whopping 10MB disk which had me&#xA;feeling like the big cheese on campus. Today, the dinkiest of storage&#xA;devices is measured in gigabytes, and my status as a superhero is very&#xA;much in doubt. But even though capacity has enlarged at an astounding&#xA;rate, the files we store (images, music, and the all-important funny cat&#xA;videos) keep pace with that growth, so even our gargantuan disks are overflowing.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Backtracking Warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-warmup/</guid>
				<description>&lt;p&gt;When you encounter a bug in a program, your first instinct is often to ask “&lt;em&gt;Why &lt;strong&gt;isn’t&lt;/strong&gt; my program doing what I want it to do?&lt;/em&gt;”&lt;/p&gt;&#xA;&lt;p&gt;One of the best ways to find that answer is to instead start with a different question: “&lt;em&gt;What &lt;strong&gt;is&lt;/strong&gt; my program doing, and why is that different than what I intended?&lt;/em&gt;”&lt;/p&gt;&#xA;&lt;p&gt;The debugger is a powerful tool for observing exactly what a program is doing. With clear information about what is happening when a program is executing, you can then tackle the next questions of how that outcome relates to what you&amp;rsquo;ve expressed in code and how to change the code to instead reflect your intentions.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Balanced Operators</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-balanced/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-balanced/</guid>
				<description>&lt;p&gt;In the syntax of most programming languages, there are characters that occur only in nested pairs, which are called &lt;em&gt;bracketing operators&lt;/em&gt;.  C++, for example, has these bracketing operators:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;( . . . )&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[ . . . ]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;{ . . . }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In a well-formed program, the bracketing operators must be properly nested and matched. As part of analyzing your code, the compiler confirms all expressions are balanced. If you have ever failed to follow protocol, you have encountered the compiler&amp;rsquo;s ire expressed in a swath of red text and highlighting. For this assignment task, you will write your own code to detect when the bracketing operators in an expression are not balanced.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Beyond Algorithmic Analysis</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-ethics/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-ethics/</guid>
				<description>&lt;p&gt;In Week 2 of lecture, you learned about using the techniques of benchmarking (i.e., measuring run time in our test framework) and counting the number of writes to &amp;ldquo;boxes&amp;rdquo; of memory, to determine performance characteristics of different algorithms using a Vector.  Next week, we will expand and formalize our accounting of the number of steps in an algorithm using a technique called Big-O analysis, which will inform our study of algorithms throughout the rest of the course. However, we want to approach the topic of efficiency and optimization with a certain amount of cautious skepticism in terms of its ethical implications. This assignment is designed to prepare you to learn about Big-O by pausing to consider these implications.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Common Build/Run/Debug Issues</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/commonissues/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/commonissues/</guid>
				<description>&lt;script&gt;&#xA;$(document).ready(function() {&#xA;    $(&#34;dd&#34;).after(&#34;&lt;hr&gt;&#34;);&#xA;});&#xA;&lt;/script&gt;&#xA;&lt;style&gt;&#xA;&#x9;dt { Q:true; font-size: 115%; font-weight: 500; padding: 12px 0px 12px 10px; background-color: #efefef; border-left: 4px solid gray;}&#xA;&#x9;dd { A:true; padding: 12px 40px 12px 40px; border-left: 4px solid #efefef;}&#xA;&lt;/style&gt;&#xA;&lt;p&gt;This page contains a list of common issues students may encounter when trying to build, run, or debug their code.&#xA;If you&amp;rsquo;re stuck on an issue, try searching this page using Ctrl+F (Command+F on Mac) to jump quickly to the text matching the error message or description of the issue you are having.&#xA;You can also check out the [Qt troubleshooting guide][troubleshooting] if you&amp;rsquo;re having issues with Qt Creator.&#xA;{: .alert .alert-success}&lt;/p&gt;</description>
			</item>
			<item>
				<title>Course placement</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/course_placement/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/course_placement/</guid>
				<description>&lt;p&gt;The CS department offers many programming courses and it can be&#xA;difficult to know exactly where to begin. This handout provides a&#xA;general overview of these classes and some advice about selecting the&#xA;class that&amp;rsquo;s right for you.&lt;/p&gt;&#xA;&lt;p&gt;If you have any questions, please feel free to come talk to the course&#xA;staff! We&amp;rsquo;d be happy to offer one-on-one advice.&lt;/p&gt;&#xA;&lt;h2 id=&#34;cs106a-start-here&#34;&gt;CS106A: Start here!&lt;/h2&gt;&#xA;&lt;p&gt;CS106A is our first-quarter programming course. It teaches the widely-used Python programming language along with good software engineering principles. If you&amp;rsquo;re interested in learning how to program a computer, this is the place to start. CS106A has no prerequisites – it&amp;rsquo;s open to everyone! The course is explicitly designed to appeal to humanists and social scientists as well as hard-core techies. In fact, most CS 106A graduates end up majoring outside of the School of Engineering. The course requires no previous background in programming, but does require considerable dedication and hard work.&lt;/p&gt;</description>
			</item>
			<item>
				<title>CS106B and the Honor Code</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/honor_code/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/honor_code/</guid>
				<description>&lt;p&gt;Since 1921, academic conduct for students at Stanford has been governed&#xA;by the Honor Code, which reads as follows (with updates in 2023):&lt;/p&gt;&#xA;&lt;p&gt;THE STANFORD UNIVERSITY HONOR CODE&lt;/p&gt;&#xA;&lt;p&gt;The Honor Code is an undertaking of the Stanford academic community, individually and collectively. Its purpose is to uphold a culture of academic honesty.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Students will support this culture of academic honesty by neither giving nor accepting unpermitted academic aid in any work that serves as a component of grading or evaluation, including assignments, examinations, and research.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Debugging warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-warmup/</guid>
				<description>&lt;style&gt;&#xA;.language-output { color: #CC0000; }&#xA;&lt;/style&gt;&#xA;&lt;img src=&#34;https://wizardzines.com/comics/understand-can-fix/understand-can-fix.png&#34; width=75%&gt;&#xA;&lt;p&gt;&lt;small&gt;&lt;a href=&#34;https://wizardzines.com/comics/understand-can-fix&#34;&gt;&amp;ldquo;If you understand a bug, you can fix it!&amp;rdquo; by Julia Evans&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&#xA;&lt;p&gt;This exercise will add a few new debugger tricks to your repertoire that will come in handy for this assignment and into the future.&lt;/p&gt;&#xA;&lt;h2 id=&#34;debugging-objects&#34;&gt;Debugging objects&lt;/h2&gt;&#xA;&lt;p&gt;The files &lt;code&gt;ball.h&lt;/code&gt; and &lt;code&gt;ball.cpp&lt;/code&gt; define a &lt;code&gt;Ball&lt;/code&gt; class that models a ball bouncing in a window. The member variables for a ball include its &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; position, its velocity on both axes, and the window where the ball is drawn.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Doubly-Linked List Warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-dll-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-dll-warmup/</guid>
				<description>&lt;h2 id=&#34;part-two-doubly-linked-list-warmup&#34;&gt;Part Two: Doubly-Linked List Warmup&lt;/h2&gt;&#xA;&lt;p&gt;A common variant on the traditional linked list is the &lt;em&gt;&lt;strong&gt;doubly-linked list&lt;/strong&gt;&lt;/em&gt;. Unlike a traditional linked list, in a doubly-linked list each cell contains a pointer both to the cell that comes after it in the sequence and a pointer to the cell that comes before it in the sequence. This is shown here:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;struct&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Cell&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// Or whatever type of data you&amp;#39;d like, really&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Cell&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;  &lt;span class=&#34;n&#34;&gt;next&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// Pointer to the next cell in the list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Cell&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;  &lt;span class=&#34;n&#34;&gt;prev&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// Pointer to the previous cell in the list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s how we might draw a doubly-linked list:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ethics of Prioritization and Ranking</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqethics/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqethics/</guid>
				<description>&lt;h2 id=&#34;design-analysis&#34;&gt;Design analysis&lt;/h2&gt;&#xA;&lt;p&gt;You&amp;rsquo;re working as a software engineer and have been contracted to build a priority queue for a client. The client&amp;rsquo;s specification requests that the design support exactly three levels of priority: &amp;ldquo;high&amp;rdquo;, &amp;ldquo;medium&amp;rdquo;, and &amp;ldquo;low&amp;rdquo;. Elements enqueued at the same priority level are to be processed in FIFO (first-in-first-out) order.  Your manager proposes a design for a new &lt;code&gt;PQueue&lt;/code&gt; class whose internal implementation consists of three ordinary &lt;code&gt;Queue&lt;/code&gt;s: one for high priority elements, one for medium priority elements, and one for low priority elements. To dequeue elements, it would first drain the high priority queue, then medium and low.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Getting Help</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/getting_help/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/getting_help/</guid>
				<description>&lt;p&gt;We provide a variety of support resources in CS106B to help you as much as possible with assignment, material, or other questions throughout the quarter.&lt;/p&gt;&#xA;&lt;p&gt;The main resource for conceptual and debugging help with your assignments will be the &lt;a href=&#34;../lair&#34;&gt;LaIR&lt;/a&gt;, which is the help center staffed by section leaders.  The lecturers and Head TA will hold regular &lt;a href=&#34;../office_hours&#34;&gt;office hours&lt;/a&gt;.  You can ask questions and receive help asynchronously using the &lt;a href=&#34;https://edstem.org/us/courses/100776/discussion&#34;&gt;Ed Discussion forum&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To help you make the most of these resources, we&amp;rsquo;ve compiled a list of the kinds of common issues or questions that may come up throughout the quarter, and the best way to get help for each.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Huffman coding</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman-huffman/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman-huffman/</guid>
				<description>&lt;p&gt;Huffman coding is an algorithm devised by David Huffman in 1952 for compressing data. This simple and elegant approach is powerful enough that variants of it are still used today in computer networks, fax machines, modems, HDTV, and other areas. You will be impressed with its clever use of trees and your ability to implement such a nifty tool!&lt;/p&gt;&#xA;&lt;h2 id=&#34;huffman-warmup&#34;&gt;Huffman warmup&lt;/h2&gt;&#xA;&lt;p&gt;Be sure to have completed the preparatory &lt;a href=&#34;../7-huffman-warmup&#34;&gt;warmup exercises&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;review-starter-code&#34;&gt;Review starter code&lt;/h2&gt;&#xA;&lt;p&gt;Before you get started in earnest, take stock of the files in the starter project and what&amp;rsquo;s provided to you. Here are some details to become acquainted with:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Huffman tree warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/7-huffman-warmup/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;https://wizardzines.com/comics/take-breaks/take-breaks.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;small&gt;&lt;a href=&#34;https://wizardzines.com/comics/take-breaks&#34;&gt;&amp;ldquo;Debugging is hard, take breaks!&amp;rdquo; by Julia Evans&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&#xA;&lt;p&gt;In these exercises, you will practice with Huffman trees to establish a solid understanding of the Huffman algorithm before you start implementing the program.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Huffman coding was introduced in &lt;a href=&#34;../../lectures/24-huffman&#34;&gt;Lecture 24&lt;/a&gt;. We also posted a &lt;a href=&#34;../7-huffman_background&#34;&gt;handout&lt;/a&gt;] that repeats that info if reading works better for you than lecture. &lt;strong&gt;Be sure you have watched/read this content first!&lt;/strong&gt; The assignment writeup assumes familiarity with this content and does not repeat it.&#xA;{:.alert .alert-warning}&lt;/p&gt;</description>
			</item>
			<item>
				<title>IG1: CS106B</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig1/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig1/</guid>
				<description>&lt;h2 id=&#34;the-first-ig&#34;&gt;The first IG!&lt;/h2&gt;&#xA;&lt;p&gt;📦 &lt;a href=&#34;https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/code/IG1.zip&#34;&gt;Starter code&lt;/a&gt;&lt;br&gt;&#xA;For this IG, please (roughly) follow the following script:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Introduce yourself, and ask the student how the course is going so far, and ask if there is anything they are excited about or concerned about. Since this is the first IG, it&amp;rsquo;s a great time to get to know your students more.&lt;/li&gt;&#xA;&lt;li&gt;Ask if they have any questions about assignment 1. How did it go? Were there any challenging parts? Feel free to discuss concerns you may have about the assignment.&lt;/li&gt;&#xA;&lt;li&gt;Once that discussion is finished (a few minutes, perhaps), say that you&amp;rsquo;d like to go over another problem that has a similar feel to assignment 1. Specifically, we want to write the &lt;code&gt;int sumDigits(string s)&lt;/code&gt; function from the code you can see down at the bottom of the page:&lt;/li&gt;&#xA;&lt;li&gt;You can code it together on a white board, on paper, or on your computer (see the Qt project above). If you code it in Qt, there are &lt;code&gt;PROVIDED_TEST&lt;/code&gt; functions you can use to test the code.&lt;/li&gt;&#xA;&lt;li&gt;Try to let the student do the bulk of the coding. If they get stuck, help them as you might in the LaIR.&lt;/li&gt;&#xA;&lt;li&gt;If they are successful, congratulate them, and tell them that it looks like they are making great progress in the course. If they struggled or didn&amp;rsquo;t finish the problem, talk to them about going back over assignment 1, and perhaps reviewing the section code from last week.&lt;/li&gt;&#xA;&lt;li&gt;After IG, fill out a quick check-plus / check / check-minus bucket in the IG Problem category of A1&amp;rsquo;s Paperless assignment (note: this category is hidden to students). We aren&amp;rsquo;t using those marks to assess the student, but to keep an eye on students that may be struggling. Don&amp;rsquo;t worry, the points are just there to allow for bucket grading &amp;ndash; this does not contribute to the student&amp;rsquo;s grade&#xA;&lt;ul&gt;&#xA;&lt;li&gt;check-plus: the student did a great job! They were able to solve the problem independently or with very very minimal interaction with you. They seem confident on this week&amp;rsquo;s material and seem caught up with lecture.&lt;/li&gt;&#xA;&lt;li&gt;check: the student was able to solve most of the problem, but required some prompting from you. There was a lack of understanding in a few areas of the problem. There is room for improvement, but the student seems to have some concepts down.&lt;/li&gt;&#xA;&lt;li&gt;check-minus: the student made little to no progress on the problem, and required much interaction with you in order to write any code. There was a serious lack of understanding of fundamental concepts from lecture this week.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Enjoy! Please reach out to Cynthia or Yasmine if you have any questions or feedback. Scroll down to see the problem!&lt;/p&gt;</description>
			</item>
			<item>
				<title>IG3: Recursion</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig3/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig3/</guid>
				<description>&lt;style&gt;&#xA;hr {&#xA;  border: none;           /* Remove the default border */&#xA;  height: 4px;            /* Make the line thicker */&#xA;  background-color: #003366; /* Dark blue color */&#xA;  margin: 20px 0;         /* Optional: add vertical spacing */&#xA;  border-radius: 2px;     /* Optional: slightly rounded edges */&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;h2 id=&#34;ig-problem-for-the-week-of-22-week-5&#34;&gt;IG problem for the week of 2/2 (Week 5)&lt;/h2&gt;&#xA;&lt;p&gt;📦 &lt;a href=&#34;https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/code/PrintRange.zip&#34;&gt;Starter code&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Happy Week 5! We hope your week is off to a great start and that IGs went well for A2 last week. Here is all the information you need for IGs during Week 5 (for A3).&lt;/p&gt;</description>
			</item>
			<item>
				<title>IG6: Linked Lists</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig6/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/staff/ig6/</guid>
				<description>&lt;style&gt;&#xA;hr {&#xA;  border: none;           /* Remove the default border */&#xA;  height: 4px;            /* Make the line thicker */&#xA;  background-color: #003366; /* Dark blue color */&#xA;  margin: 20px 0;         /* Optional: add vertical spacing */&#xA;  border-radius: 2px;     /* Optional: slightly rounded edges */&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;h2 id=&#34;ig-problem-for-the-week-of-11162025-week-9&#34;&gt;IG problem for the week of 11/16/2025 (Week 9)&lt;/h2&gt;&#xA;&lt;p&gt;📦 &lt;a href=&#34;ig6.zip&#34;&gt;Starter code&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Happy Week 9, everybody! We hope you&amp;rsquo;re doing well. Here is the information you need for this week&amp;rsquo;s IG problem.&lt;/p&gt;</description>
			</item>
			<item>
				<title>LaIR helper hours</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/lair/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/lair/</guid>
				<description>&lt;h2 id=&#34;what-are-lair-helper-hours&#34;&gt;What are LaIR helper hours?&lt;/h2&gt;&#xA;&lt;p&gt;LaIR helper hours are an additional set of office hours staffed by our awesome fleet of section leaders. At the LaIR, students can get individual help with debugging and conceptual questions.&lt;/p&gt;&#xA;&lt;p&gt;For more information on Black LaIR, run by Stanford Black in CS, see &lt;a href=&#34;https://blackincs.stanford.edu/black-lair&#34;&gt;their website&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;logistics&#34;&gt;Logistics&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;LaIR starts week 2 of the quarter.&lt;/li&gt;&#xA;&lt;li&gt;The LaIR help queue is open Sunday-Thursday this quarter. To sign up for help, add your request to the queue using the &lt;a href=&#34;https://cs198.stanford.edu/lair&#34;&gt;LaIR signup page&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;In-person LaIR is in &lt;a href=&#34;https://campus-map.stanford.edu/?id=07-430&amp;amp;lat=37.429924&amp;amp;lng=-122.17178&amp;amp;zoom=17&amp;amp;srch=coda&#34;&gt;CoDa B60&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;weekly-schedule&#34;&gt;Weekly schedule&lt;/h2&gt;&#xA;&lt;p&gt;LaIR runs &lt;strong&gt;Sunday-Thursday, 7-11PM Pacific Time&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Lectures</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_lectures/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_lectures/</guid>
				<description>&lt;p&gt;We have scheduled our lecture to meet in the largest room available on campus, and expect all on campus students to attend in person and engage with the learning activities. Although there is a policy in place to allow for some flexibility (see &lt;a href=&#34;https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1264/course/syllabus/&#34;&gt;syllabus&lt;/a&gt;), I want to emphasize how important it is to attend in person if at all possible. By watching videos, you get access to what I&amp;rsquo;ve said in class, but you are robbed of the experience of hearing what your seatmates have to say during the problem-solving activities, as well as of the opportunity to say things to them. This practice in real-time verbal grappling with programming concepts is essential training for anyone planning a career that involves software engineering or working with software engineers.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mazes</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-maze/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-maze/</guid>
				<description>&lt;p&gt;A &lt;em&gt;maze&lt;/em&gt; is a twisty and convoluted arrangement of corridors that challenges the solver to find a path from the entry to the exit. This part of the assignment is about using ADTs to represent, process, and solve mazes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;../2-adt/img/solve_animating.gif&#34; alt=&#34;animation of BFS search on maze&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;an-introduction-to-mazes&#34;&gt;An introduction to mazes&lt;/h2&gt;&#xA;&lt;p&gt;Labyrinths and mazes have fascinated humans since ancient times (remember &lt;a href=&#34;https://www.youtube.com/watch?v=8qrZ1clEp-Y&#34;&gt;Theseus and the Minotaur&lt;/a&gt;?), but mazes can be more than just recreation. The mathematician Leonhard Euler was one of the first to analyze mazes mathematically, and in doing so, he founded the branch of mathematics known as topology. Many algorithms that operate on mazes are closely related to graph theory and have applications to diverse tasks such as designing circuit boards, routing network traffic, motion planning, and social networking.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Merge</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-merge/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-merge/</guid>
				<description>&lt;h2 id=&#34;binary-merge&#34;&gt;Binary merge&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;strong&gt;binary merge&lt;/strong&gt; operation is a very common operation in computer science, where two individual sorted sequences are merged into one larger sorted sequence. Merging is the backbone of many different sorting tasks (some of which we will explore later in the course), making this operation useful in a broad array of applications.&lt;/p&gt;&#xA;&lt;h3 id=&#34;implementing-merge&#34;&gt;Implementing merge&lt;/h3&gt;&#xA;&lt;p&gt;Your first task is to write the function&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Queue&amp;lt;int&amp;gt; binaryMerge(Queue&amp;lt;int&amp;gt; one, Queue&amp;lt;int&amp;gt; two)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which performs an &lt;strong&gt;iterative binary merge&lt;/strong&gt;. Here are the specifications:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Office Hours</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/office_hours/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/office_hours/</guid>
				<description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;../lair&#34;&gt;LaIR helper hours&lt;/a&gt; are held each night Sunday through Thursday, and staffed by our sturdy fleet of section leaders. At the LaIR, students can get individual help with debugging and conceptual questions.&lt;/p&gt;&#xA;&lt;p&gt;The instructor and Head TA will also be holding weekly office hours throughout the quarter for you to discuss any questions you might have about assignments, course material or simply Computer Science and life in general. The schedule is on the course home page in the left sidebar.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Part 1: Debugging Warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-warmup/</guid>
				<description>&lt;p&gt;This exercise will add a few new debugger tricks to your repertoire that will come in handy for this assignment and into the future.&lt;/p&gt;&#xA;&lt;h2 id=&#34;debugging-objects&#34;&gt;Debugging Objects&lt;/h2&gt;&#xA;&lt;p&gt;This warmup exercise uses a bouncing ball simulation. The files &lt;code&gt;Ball.h&lt;/code&gt; and &lt;code&gt;Ball.cpp&lt;/code&gt; define a &lt;code&gt;Ball&lt;/code&gt; class that models a ball bouncing in a window. The member variables for a ball include its &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; positions, its velocity on both axes, and the bounding box in which it bounces.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Part 2: Simulate a String Instrument</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-stringinstrument/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-stringinstrument/</guid>
				<description>&lt;p&gt;Your first step in building the Tone Matrix is to implement a &lt;code&gt;StringInstrument&lt;/code&gt; type that performs a simplified physical simulation of a plucked string instrument. We&amp;rsquo;ll begin with a quick overview of how computers handle sound, then discuss what you need to do.&lt;/p&gt;&#xA;&lt;h2 id=&#34;overview-sound-waves-and-digital-sound&#34;&gt;Overview: Sound Waves and Digital Sound&lt;/h2&gt;&#xA;&lt;p&gt;Sound is a type of wave that moves through the air. The characteristics of those waves determine what you hear. A full description of sound perception is beyond the scope of this course, so for the purposes of this assignment we&amp;rsquo;ll focus on three attributes of sound waves. Those attributes are the &lt;em&gt;&lt;strong&gt;amplitude&lt;/strong&gt;&lt;/em&gt; of the wave (how intensely the wave oscillates between high and low), the &lt;em&gt;&lt;strong&gt;frequency&lt;/strong&gt;&lt;/em&gt; of the wave (how many times the wave changes from high to low in one second), and the &lt;em&gt;&lt;strong&gt;shape&lt;/strong&gt;&lt;/em&gt; of the wave (the pattern by which the wave switches from high to low).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Part 3: Implement the Tone Matrix</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-tonematrix/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-tonematrix-tonematrix/</guid>
				<description>&lt;p&gt;You now have a working string instrument simulation. Your next task is to implement the &lt;code&gt;ToneMatrix&lt;/code&gt; type, which will maintain a grid of lights, respond to user input, determine when to pluck each string, and decide what data gets sent to the computer speakers.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s how &lt;code&gt;ToneMatrix&lt;/code&gt; is defined:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-c++&#34; data-lang=&#34;c++&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;ToneMatrix&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;public&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Creates a Tone Matrix whose grid is gridSize x gridSize and&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * where each light in the matrix has size lightSize x lightSize.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * The lightSize parameter just determines the size, in pixels,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * of each light in the grid.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;ToneMatrix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;gridSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;lightSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Frees all memory used by this Tone Matrix. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;o&#34;&gt;~&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToneMatrix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Reacts to the mouse being pressed at a given position on&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * the screen, toggling the state of the light the mouse&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * hovers over.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;mousePressed&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mouseX&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mouseY&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Reacts to the mouse being dragged from its previous&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * position to position (mouseX, mouseY). The light at the&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * new position has its state updated appropriately. Details&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * are given later.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;mouseDragged&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mouseX&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mouseY&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Draws each light in the Tone Matrix. Details are&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * given later.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;draw&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;const&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Advances time forward one step, returning the next sound&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * sample to play. Details are given later.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;Sample&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;nextSample&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Described later. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;void&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;resize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;newGridSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;private&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Number of lights in one side of the grid (e.g. in a 16 x 16&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * grid, this will be 16).&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_gridSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* How big each light in the tone matrix is. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_lightSize&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* The 2D grid of lights in the matrix; details are given below. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;bool&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_grid&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* The instruments corresponding to each row. */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;StringInstrument&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;_instruments&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;cm&#34;&gt;/* Additional data members and member functions of your own choosing;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * you&amp;#39;re free to add extra information here if you&amp;#39;d like. Details are&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * given below. Friendly reminder to follow the convention of adding an&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     * underscore in front of any private member variables you declare!&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;cm&#34;&gt;     */&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We&amp;rsquo;ve broken the task of implementing this type down into four smaller milestones to be completed in sequence.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Particle System</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-particle-system/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-particle-system/</guid>
				<description>&lt;h2 id=&#34;part-three-particle-systems&#34;&gt;Part Three: Particle Systems&lt;/h2&gt;&#xA;&lt;p&gt;Many computer-generated visual effects - whether in blockbuster Hollywood movies or in video games - make use of &lt;em&gt;&lt;strong&gt;particle systems&lt;/strong&gt;&lt;/em&gt;. As the name suggests, a particle system is a system that consists of individual units called &lt;em&gt;&lt;strong&gt;particles&lt;/strong&gt;&lt;/em&gt;. Those particles can have attributes like position, color, velocity, etc., and by maintaining systems consisting of hundreds or thousands of particles it&amp;rsquo;s possible to build some beautiful effects from simple pieces.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Perfect Numbers</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/1-cpp-perfect/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/1-cpp-perfect/</guid>
				<description>&lt;p&gt;This warmup task gives you practice with C++ expressions, control structures, and functions, as well as testing and debugging your code.&lt;/p&gt;&#xA;&lt;p&gt;Throughout the writeup, we pose thought questions (in the highlighted yellow boxes) for you to answer.  The starter project includes the file &lt;code&gt;short_answer.txt&lt;/code&gt; (located under &amp;ldquo;Other Files&amp;rdquo; in the Qt Project pane). Edit this file to fill in your responses and submit it with your code. Your section leader will review your responses as part of grading. We&amp;rsquo;ll be evaluating the sincerity and thoughtfulness of your reflection and reasoning; not a rigid &amp;ldquo;right/wrong&amp;rdquo; thing.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PQ Array</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqarray/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqarray/</guid>
				<description>&lt;h2 id=&#34;what-is-a-priority-queue&#34;&gt;What is a Priority Queue?&lt;/h2&gt;&#xA;&lt;p&gt;A standard queue processes elements in the first-in, first-out (&amp;ldquo;FIFO&amp;rdquo;) manner typical of ordinary waiting lines. New elements are added to the back of the queue and the next element to be processed is taken from the front. Queues are a very useful abstraction, but a FIFO strategy isn&amp;rsquo;t always what is needed.&lt;/p&gt;&#xA;&lt;p&gt;A hospital emergency room, for example, needs to schedule patients according to priority. A patient with a more critical problem will pre-empt others who arrived earlier. The data structure that supports this behavior is called a &lt;strong&gt;priority queue&lt;/strong&gt;. Each element is enqueued with an associated priority, and dequeue retrieves the element with the most urgent priority. There are many practical applications for a priority queue, both inside and outside computer science!&lt;/p&gt;</description>
			</item>
			<item>
				<title>PQ client</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqclient/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqclient/</guid>
				<description>&lt;h2 id=&#34;put-your-client-hat-on&#34;&gt;Put your client hat on!&lt;/h2&gt;&#xA;&lt;p&gt;Having finished &lt;code&gt;PQArray&lt;/code&gt; and before starting on &lt;code&gt;PQHeap&lt;/code&gt;, we take a brief diversion to appreciate the utility of the Priority Queue class as an abstraction for solving interesting and challenging problems.&lt;/p&gt;&#xA;&lt;p&gt;While acting in the role of class implementer, the programmer is head down, focusing on the nitty-gritty of the functionality, navigating the challenges and tricky details to ensure the class works correctly in all situations. You just experienced this for yourself for &lt;code&gt;PQArray&lt;/code&gt;. However, once the class is tested and debugged, it is a delight to switch hats to become a client of your own data structure and take advantage of what the class has to offer! Remember in previous assignments when you made use of &lt;code&gt;Vector&lt;/code&gt; and &lt;code&gt;Map&lt;/code&gt; to solve problems without worrying about how those data structures were actually implemented? Let&amp;rsquo;s revisit this powerful land of problem-solving and see what you can do with a working implementation of a handy data structure like the &lt;code&gt;PQArray&lt;/code&gt; now in your repertoire.&lt;/p&gt;</description>
			</item>
			<item>
				<title>PQ Heap</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqheap/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/5-pqueue-pqheap/</guid>
				<description>&lt;h2 id=&#34;adts-for-the-win&#34;&gt;ADTs for the win&lt;/h2&gt;&#xA;&lt;p&gt;Now you are ready for the &lt;em&gt;pièce de résistance&lt;/em&gt; — implementing the priority queue as a binary heap.  One of the fantastic features of C++ classes as an abstraction is that you can swap out its inner workings for a totally different implementation, with minimal impact on the client. For example, you can change how your internal algorithms to rev up performance or switch a more compact data representation to save space, all the while your clients continue using the same interface, and receive the benefits of your improvements without lifting a finger.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Python to C&#43;&#43; Guide</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/python_to_cpp/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/python_to_cpp/</guid>
				<description>&lt;style&gt;&#xA;table td, table td * {&#xA;    vertical-align: top;&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;h2 id=&#34;denoting-structure-semicolons-parentheses-and-braces&#34;&gt;Denoting Structure: Semicolons, Parentheses, and Braces&lt;/h2&gt;&#xA;&lt;p&gt;In Python, indentation and whitespace indicates where statements end and how structures nest inside one another. In C++, you need to explicitly indicate this using semicolons, parentheses, and braces.&lt;/p&gt;&#xA;&lt;p&gt;Curly braces – the &lt;code&gt;{&lt;/code&gt; and &lt;code&gt;}&lt;/code&gt; characters – are almost exactly equivalent to Python indentation. You’ll need to use them in if statements, for loops, while loops, and functions. For example:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Questions from prospective students</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/faq/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/faq/</guid>
				<description>&lt;h3 id=&#34;how-will-lectures-be-delivered-is-attendance-required-will-they-be-recorded&#34;&gt;How will lectures be delivered? Is attendance required? Will they be recorded?&lt;/h3&gt;&#xA;&lt;p&gt;Lectures will be delivered live MWF 1:30pm in Hewlett 200 auditorium. Attendance is required for on-campus students. Read more &lt;a href=&#34;../about_lectures&#34;&gt;about lectures&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-will-sections-work-is-attendance-required&#34;&gt;How will sections work? Is attendance required?&lt;/h3&gt;&#xA;&lt;p&gt;Sections will meet weekly in person (except for CGOE sections) and your attendance and participation in section is required and contributes 10% of your course grade.  Note the section times listed in Axess are &lt;strong&gt;not accurate&lt;/strong&gt;. Section times will be arranged in the first week of the quarter. Read more &lt;a href=&#34;../about_section&#34;&gt;about section&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Recursion warmup</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-warmup/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-warmup/</guid>
				<description>&lt;img src=&#34;https://wizardzines.com/comics/bugs-are-normal/bugs-are-normal.png&#34; width=60%&gt;&#xA;&lt;p&gt;&lt;small&gt;&lt;a href=&#34;https://wizardzines.com/comics/bugs-are-normal&#34;&gt;&amp;ldquo;Bugs are normal&amp;rdquo; by Julia Evans&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-examine-recursive-stack-frames-factorial&#34;&gt;1) Examine recursive stack frames (&lt;code&gt;factorial&lt;/code&gt;)&lt;/h2&gt;&#xA;&lt;p&gt;The factorial &lt;code&gt;n!&lt;/code&gt; is defined as the product &lt;code&gt;n * (n-1) * (n-2) * ... * 3 * 2 * 1&lt;/code&gt;. The recursive approach to computing factorials uses the insight that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;0!&lt;/code&gt; is defined to be &lt;code&gt;1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;n!&lt;/code&gt; can be computed as &lt;code&gt;n * (n-1)!&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To express this in code, we write a &lt;em&gt;base case&lt;/em&gt; to return 1 for zero and use a &lt;em&gt;recursive case&lt;/em&gt; to compute the result for &lt;code&gt;n&lt;/code&gt; building on the result from &lt;code&gt;n-1&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Search Engine</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-searchengine/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/2-adt-searchengine/</guid>
				<description>&lt;h2 id=&#34;an-introduction-to-search-engines&#34;&gt;An introduction to search engines&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;../2-adt/img/search.png&#34; alt=&#34;google search home page&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Search engines are one of the most influential developments of the modern internet age and have completely revolutionized how users interact with the web. What was once an intractable jumble of data with no semblance of organization has become a treasure trove of useful information due to the magic of search. Armed with the power of &lt;code&gt;Map&lt;/code&gt; and &lt;code&gt;Set&lt;/code&gt;, you can recreate this phenomenal achievement yourself. Once completed, you will understand the core technology underpinning Spotlight, Google, and Bing, and have solid practice in the use of the &lt;code&gt;Map&lt;/code&gt; and &lt;code&gt;Set&lt;/code&gt; ADTs.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Section</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_section/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/about_section/</guid>
				<description>&lt;p&gt;Each week, you’ll meet for an hour in a small group discussion section. The discussion section will be led by your assigned section leader, who is also your mentor and grader in the course. During section, you and your peers will review the material that has been introduced in lecture, work together on the section practice problems, and ask and answer questions.&lt;/p&gt;&#xA;&lt;p&gt;The section materials for each week consist of a set of problems for further practice with the recent lecture topics. You’re not expected to complete these problems before attending section nor are they submitted to be graded.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Sierpinski</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-sierpinski/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/3-recursion-sierpinski/</guid>
				<description>&lt;p&gt;Recursion can produce incredible and beautiful images that have self-similar subparts. The designs are  known as &lt;em&gt;fractals&lt;/em&gt;. One of the most famous fractals is the &lt;strong&gt;Sierpinski triangle&lt;/strong&gt;, named after the Polish mathematician Waclaw Sierpinski (1882–1969).&lt;/p&gt;&#xA;&lt;p&gt;As with many self-similar patterns, it is defined recursively:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;An order-0 Sierpinski triangle is a single filled triangle.&lt;/li&gt;&#xA;&lt;li&gt;An order*-n* Sierpinski triangle, where &lt;em&gt;n &amp;gt; 0&lt;/em&gt;, consists of three&#xA;Sierpinski triangles of order &lt;em&gt;n – 1&lt;/em&gt;, whose side lengths are half the size of the original side lengths, arranged so that they meet corner-to-corner.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For example, here are Sierpinski triangles of the first few orders:&#xA;&lt;img src=&#34;../3-recursion/img/sierpinski.png&#34; alt=&#34;sierpinski triangles of orders 0-4&#34;&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Soundex</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/1-cpp-soundex/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/1-cpp-soundex/</guid>
				<description>&lt;p&gt;For the Soundex search portion of the assignment you will:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;study a real-world algorithm used by the U.S. Census to encode the phonetic pronunciation of surnames.&lt;/li&gt;&#xA;&lt;li&gt;implement the algorithm, developing a function that can take surnames as input and produce phonetic encodings as output.&lt;/li&gt;&#xA;&lt;li&gt;implement a console program that allows users to input a surname and then find all matches in a database of Stanford surnames that have the same encoding.&lt;/li&gt;&#xA;&lt;li&gt;respond to a few reflective questions on the efficacy and limitations of this algorithm.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The coding is mostly C++ string processing, along with a little bit of file reading and use of &lt;code&gt;Vector&lt;/code&gt;.  You&amp;rsquo;ll also be practicing with use of decomposition and a test-as-you-go strategy.  The two files you will be editing are &lt;code&gt;soundex.cpp&lt;/code&gt; (for the code) and &lt;code&gt;short_answer.txt&lt;/code&gt; (for responses to thought questions).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Style Guide</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/style_guide/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/style_guide/</guid>
				<description>&lt;style&gt;&#xA;    pre {&#xA;        padding: 0.2em;&#xA;        background-color: #f8f8ff;&#xA;        border: 1px dashed #ccccff;&#xA;        border-radius: 4px;&#xA;        margin: .5em 0 1em 0;&#xA;        min-width: 45%;&#xA;    }&#xA;&#xA;    div.bad pre {&#xA;        background-color: #ffcccc;&#xA;    }&#xA;    div.good pre {&#xA;        background-color: #dbefcd;&#xA;    }&#xA;&lt;/style&gt;&#xA;&lt;p&gt;You may think the motivation for good style is earning that ✔+ from your section leader, but the most important beneficiary of your efforts is &lt;strong&gt;you yourself&lt;/strong&gt;.  Committing yourself to writing tidy, well-structured code from the start sets you up for good times to come. Your code will be easier to test, will have fewer bugs, and what bugs there are will be more isolated and easier to track down. You finish faster, your results are better, and your life is more pleasant. What&amp;rsquo;s not to like?&lt;/p&gt;</description>
			</item>
			<item>
				<title>Submit checklist</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/submit_checklist/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/submit_checklist/</guid>
				<description>&lt;p&gt;This handy checklist is designed to help confirm your code is fully&#xA;ready to go before you submit it. Before you send it in for grading, take a few minutes to work through this checklist.&lt;/p&gt;&#xA;&lt;h2 id=&#34;functionality&#34;&gt;Functionality&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;✅ I’ve re-read the assignment writeup and verified my program matches the required specification.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;✅ I’ve reviewed my code and understand each line of code I’ve written, why it’s there, and why it’s necessary.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Syllabus</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/syllabus/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/syllabus/</guid>
				<description>&lt;style&gt;&#xA;.grid-gallery&#xA;{&#xA;    display: grid;&#xA;    grid-template-columns: repeat(10, minmax(50px, 100px) );&#xA;    grid-gap: 4px;&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;h1 id=&#34;hi-there--and-welcome-to-cs106b&#34;&gt;&lt;strong&gt;Hi there 👋 and welcome to CS106B!&lt;/strong&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;CS106B Programming Abstractions&lt;/strong&gt; is the second course in our introductory programming sequence. The prerequisite CS106A establishes a solid foundation in programming methodology and problem-solving in Python. With that under your belt, CS106B will acquaint you with the C++ programming language and introduce advanced programming techniques such as recursion, algorithm analysis, data abstraction, explore classic data structures and algorithms, and give you practice applying these tools to solving complex problems.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Testing and the SimpleTest framework</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/testing_guide/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/testing_guide/</guid>
				<description>&lt;h2 id=&#34;why-testing&#34;&gt;Why testing?&lt;/h2&gt;&#xA;&lt;p&gt;Anybody that writes code for some purpose (whether as a researcher, a software engineer, or in any other profession) will get to the point where others are relying on their code. Bugs in software can be &lt;a href=&#34;https://royal.pingdom.com/10-historical-software-bugs-with-extreme-consequences/&#34;&gt;dangerous or even deadly&lt;/a&gt;. Additionally, users do not enjoy using software that is buggy and crashes and fixing bugs once the software is in production is very costly. Most importantly, &lt;strong&gt;good engineers take pride in building things that work well and are robust.&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Textbook</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/textbook/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/course/textbook/</guid>
				<description>&lt;p&gt;&lt;img src=&#34;img/textbook-cover.jpg&#34; alt=&#34;image of textbook cover&#34;&gt;{: style=&amp;ldquo;float:right;&amp;rdquo;}&lt;/p&gt;&#xA;&lt;p&gt;The CS106B textbook is &lt;strong&gt;Roberts, Eric S. &lt;em&gt;Programming Abstractions in C++&lt;/em&gt; ,  ISBN 978-0133454840&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The book was written by Stanford CS professor Eric Roberts and targeted directly for this course. Readings from the textbook are suggested to accompany lecture.&lt;/p&gt;&#xA;&lt;p&gt;Section problems and programming homework will not be assigned directly out of the textbook and it possible to succeed in the course without it.  However, we think you will appreciate it as a supplement to the presentation of the material in lecture and section. It also contains a wealth of practice problems for self-study.&lt;/p&gt;</description>
			</item>
			<item>
				<title>The Labyrinth!</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-labyrinth/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/6-lists-labyrinth/</guid>
				<description>&lt;p&gt;You have been trapped in a labyrinth, and your only hope to escape is to cast the magic spell that will free you from its walls. To do so, you will need to explore the labyrinth to find three magical items:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;strong&gt;&lt;em&gt;Spellbook&lt;/em&gt;&lt;/strong&gt; (📕), which contains the spell you need to cast to escape.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;strong&gt;&lt;em&gt;Potion&lt;/em&gt;&lt;/strong&gt; (⚗), containing the arcane compounds that power the spell.&lt;/li&gt;&#xA;&lt;li&gt;The &lt;strong&gt;&lt;em&gt;Wand&lt;/em&gt;&lt;/strong&gt; (⚚), which concentrates your focus to make the spell work.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Once you have all three items, you can cast the spell to escape to safety.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Tile Matching - The Pattern Puzzle Solver</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-tilematch/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-tilematch/</guid>
				<description>&lt;style&gt;&#xA;table{&#xA;    border-collapse: collapse;&#xA;    border-spacing: 0;&#xA;    border:1px solid #222222;&#xA;}&#xA;th{&#xA;    border:1px solid #222222;&#xA;}&#xA;td{&#xA;    border:1px solid #222222;&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;center&gt;&#xA;&lt;img alt = &#34;Vess Billion Bubbles Cola Puzzle&#34; src=&#34;../4-backtracking/img/vess-billion-bubbles-pcs1.jpg&#34; style=&#34;width: 50%;&#34;&gt;&#xA;&lt;br&gt;&#xA;Image source: &lt;a href=&#34;http://www.robspuzzlepage.com/pattern.htm&#34;&gt;Rob&#39;s Puzzle Page&lt;/a&gt;&#xA;&lt;/center&gt;&#xA;&lt;h2 id=&#34;edge-matching-puzzles&#34;&gt;Edge-matching Puzzles&lt;/h2&gt;&#xA;&lt;p&gt;In this part of the assignment, you will explore using backtracking recursion to solve an &lt;em&gt;edge-matching&lt;/em&gt; puzzle. Edge-matching puzzles have been around since the late 1800s; the &lt;a href=&#34;http://www.robspuzzlepage.com/pattern.htm&#34;&gt;vintage puzzle for &lt;em&gt;Vess Cola&lt;/em&gt;&lt;/a&gt; shown above was a common advertising giveaway during the 1930s-1950s. For the puzzle, you are given a set of square tiles that have patterned edges and the goal is to place all tiles into a grid, having located and rotated all tiles in such a way that all edges &amp;ldquo;match&amp;rdquo;. In the Vess puzzle, the edge containing a bottle top in a particular color triangle &amp;ldquo;matches&amp;rdquo; the edge containing a bottle bottom in the same color triangle. As an example, consider the middle tile of the puzzle, which correctly matches on all edges. Its north edge (cream bottle bottom) matches the south edge (cream bottle top) of the adjacent tile above. Its east edge (red bottle top) matches the west edge (red bottle bottom) of the adjacent tile to the right, and so on for its south and west edges. On the other hand, the corner tile in the upper left does not match on its east edge nor on its south edge.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Voting Power</title>
				<link>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-voting/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>cbl@stanford.edu</author>
				<guid>https://web.stanford.edu/class/archive/cs/cs106b/cs106b.1272/assignments/4-backtracking-voting/</guid>
				<description>&lt;p&gt;&lt;em&gt;Attribution: This assignment was designed by Julie Zelenski&lt;/em&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;h2 id=&#34;-be-counted&#34;&gt;🖐🏿🖐🏼 Be counted!🖐🏻🖐🏽&lt;/h2&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a class=&#34;btn btn-secondary&#34; href=&#34;https://www.stanfordvotes.org/&#34;&gt;Stanford Votes&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;small&gt;&lt;em&gt;&amp;ldquo;It&amp;rsquo;s not the voting that&amp;rsquo;s democracy; it&amp;rsquo;s the counting.&amp;rdquo;&lt;/em&gt; &amp;ndash; Tom Stoppard, Jumpers&lt;/small&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;block-voting-systems&#34;&gt;Block voting systems&lt;/h2&gt;&#xA;&lt;p&gt;It&amp;rsquo;s said that &amp;ldquo;every vote counts,&amp;rdquo; but does every vote count equally? A block voting system such as the U.S. Electoral College makes for an interesting case study in analyzing the relative voting power of each block in a system where blocks have different weights.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
