Computer Science 226
Algorithms and Data Structures
Spring 2016

Course Information | Lectures | Flipped | Assignments | Precepts | Exercises | Exams


worksheet solutions


Here is the flipped lecture schedule. You do the same assignments, do the same Blackboard exercises, take the same midterm and final exam as a traditional course. Flipped lecture students can opt out of attending precepts (although you are encouraged to attend ANY precept). Please contact Dr. Ananda Gunawardena ("guna") by emailing guna at for any questions related to the flipped lecture.

1 2/1 Union Find
(attend traditional lecture)
2 2/3 Analysis of Algorithms watchreaddoclasswork
3 2/8 Stacks and Queues watchreaddoclasswork
4 2/10 Elementary Sorts watchreaddoclasswork
5 2/15 MergeSort watchreaddoclasswork
6 2/17 Quicksort watchreaddoclasswork
7 2/22 Priority Queues watchreaddoclasswork
8 2/24 Elementary Symbol Tables · BSTs watchreaddoclasswork
9 2/29 Balanced Search Trees watchreaddoclasswork
10 3/2 HashTables - ST applications watchreaddoclasswork
11 3/7 Geometric Applications of BST watchreaddo
12 3/9 Midterm Exam watchread
13 3/21 Undirected Graphs watchreaddo
14 3/23 Directed Graphs watchreaddo
15 3/28 Minimum Spanning Trees watchreaddo
16 3/30 Shortest Paths watchreaddo
17 4/4 Maximum Flow watchreaddo
18 4/6 String Sorts watchreaddo
19 4/11 Tries watchreaddo
20 4/13 Data Compression watchreaddo
21 4/13 Substring Search watchreaddo
22 4/18 Regular Expressions watchreaddo
23 4/20 Data Compression watchread
24 4/25 Reductions watchread
25 4/27 Algorithmic Interview Questions
(attend traditional lecture)


As an alternative to traditional lectures, we offer a flipped lecture option. Flipped lectures are self-paced and students are expected to watch recorded lecture videos prior to attending class. The flipped sections meet only once a week (on Wednesdays's) and are designed to engage students with hands-on activities in a group or collaborative setting. Attendance is mandatory on Wednesday and will be counted towards participation grade. Flipped lectures can be helpful for those who are looking for an alternative instructional strategy other than traditional lectures. Flipped lectures are only recommended for those who can manage their time well to watch video lectures and perform interactive activities prior to the class. Monday is designated as the "film day" where students watch video lectures (individually or as a group) or special topic days. Flipped lectures meet in person from 11-12:20pm on Wednesday's in Jadwin A10 (attendance required) (Please attend the regular lecture in McCosh 10 for the first and last lecture).

To apply for SPRING 2016 , complete this application as soon as possible. The flipped lecture is limited to 60 students and so apply early. It will be mostly first come first served basis, so apply asap. We often have a wait list for the course.


Before applying for the flipped lecture option, think carefully about your learning style. You may be a good candidate for the flipped lecture If interested, complete this application asap. The flipped lecture is limited to 60 students. You will be notified by 2/1/16 midnight if you are allowed to be part of the flipped lecture. We often receive more application than we can accommodate. Therefore, please make sure that flipped lecture is a good option for you in this course. You will have 2-weeks to switch back to traditional lecture just in case you change your mind. After 2-weeks, you will be transferred to the L02 section of the course and Precept P99. However, you can attend ANY precept (recommended) and no record of your attendance will be kept.


Flipped lecture students are expected to complete the following activities prior to the flipped meeting session on Wednesday:


The flipped lectures are at the same time as the traditional lectures.
Monday: This is the "film" day. You are expected to watch videos on your own and engage. But in some cases, we will arrange special topics sessions so you can selectively attend.
Wednesday: This is the "meeting" day. We will meet in Jadwin A10 in a highly collaborative setting. Here is the general format of the flipped lecture on Wednesday:
Flipped lectures are synchronized with the regular lecture so you can switch back to regular lecture during the first two week of Classes.


What Princeton students have to say about flipped lectures.   Kaitlin (Katie) Hanss is a Princeton junior majoring in Computer Science. In Fall 2014, she took the flipped lecture session. Listen to Katie to understand the overall impression of flipped lectures, how she prepares for the class, about the mini lecture, how the individual and group worksheets help learn more conceptual ideas etc.


Interactive technology plays a major role in structuring the flipped classes. We are using the video and document annotation platform Classroom Salon to access and annotate the lecture videos. Each lecture video is divided into smaller videos of approximately 10-15 minutes each. For example, analysis of algorithms is a collection of 5 short video lectures. You can control the speed of the lecture videos to pace them appropriately for your learning style. To gain access to the classroom salon platform:

Mobile Access   Videos can be accessed from a mobile device such as a tablet or phone. Simply place a browser shortcut to on your mobile desktop. We highly recommend using a Chrome browser on your mobile device.
If you have trouble signing up, email Dr. Ananda Gunawardena (Guna) (


It is critical that you engage with course videos and other students, so we can maximize the learning opportunities for all. Classroom Salon promotes social learning to allow students to learn in a small collaborative setting. There are few tools that we will use to do this.

Networking.   If you prefer select your own small learning network to engage closely. The network members can be the one's who sit together in the flipped class. You still have access to all annotations from all students but network provides a way to engage with a smaller subset of the class.

Commenting.   As you watch the videos, you can add location specific comments using tags to categorize them. This is an important part of your flipped learning experience. The comments you make will help you reflect on the video as well as inform us how we should conduct the flipped session. In general make at least 3 comments (more is better) per lecture/week using some pre-defined tags. You can make comments anonymous if necessary.
Here is a list (or a variation) of the most common tags:

You may use the same tag more than once. You can make your comments anonymous if needed.

In-video prompts.   Look for special questions embedded into specific places of the video titled "local prompts". You can click on the time stamp for the comment to find the location for the local prompt. Click on the "reply" button on the comment to respond and then expand the replies to see the correct answer.

Participation points.   You will earn points for participation. You can receive up to 5 course percentage points for your participation. Participation will be measured by attendance and your engagement score. Salon will always show you your activity levels as ENGAGEMENT SCORE (calculated using comments, questions replies and consistency) and through MY DASHBOARD (shows how much time you spent on videos compared to average student). The Salon Engagement Score is a continuous reflection of your engagement compared to all others in the flipped lecture. The score is provided as a way for you to know where you are in the course and encourage you to improve your engagement. A Green color indicates that you are doing well, a Yellow indicates that you are doing ok, and Red indicates that you are NOT doing ok. To improve your score actively engage with the videos by commenting, asking questions, responding and being consistently performing these activities.

Learn from others.   We learn best by observing what others do and do not do. In Classroom Salon, you will be able to see what others have commented on. Read them when you can, vote on them and reply or extend the replies as necessary. Even if you do not make any comments in a particular video, endorse other student comments so we can discuss them online or in class.