fullscreen
timer
qrcode
plickers
selector
edit
reset

Introduction

COS 265 - Data Structures & Algorithms

Who are we?

Professor


Lab TAs

Who are we?

Students

Disclaimer





This course is based on the COS 226 Princeton course, for which the course book was written.

Introduction

Overview

Overview

This course continues on where COS 121 left off.

You have learned the fundamentals of coding.

Now we will go deeper...

This is your last chance. After this, there is no turning back. You take the blue pill—the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill—you stay in Wonderland and I show you how deep the rabbit-hole goes.
–Morpheus

The Matrix



Since you're in this course, you're taking the red pill 💊︎

Let's learn some (programming) kung-fu!

The Matrix

Objectives

Through this course, we will learn:

outcomes

We will continue reinforcing two outcomes that were introduced in COS 120 and reinforced in COS 121.

PLO[0] Analyze Problems / Think Critically
PLO[1] Design / Implement Solutions

You will not simply learn about algorithms, but become a computer scientist who can look at a new problem, determine what matters, and thoughtfully design an effective solution.

outcomes

We will continue reinforcing two outcomes that were introduced in COS 120 and reinforced in COS 121.

PLO[0] Analyze Problems / Think Critically
PLO[1] Design / Implement Solutions

outcomes

We will continue reinforcing two outcomes that were introduced in COS 120 and reinforced in COS 121.

PLO[0] Analyze Problems / Think Critically
PLO[1] Design / Implement Solutions

key idea of course

Data Structures and Algorithms are related parts, facets of computation, that are foundational to computer science.


Data Structure
organization of info with rules for storing, retrieving, and editing
Algorithm
step-by-step method for solving a problem

A computer scientist has a strong understanding of both of these.


Note

In general, a block of code is not an algorithm, and a chunk of memory is not a data structure.

key idea of course


During your career, you will see a problem solved with many different algorithm and data structure implementations.


Most will be bad; some will be OK; only a few will be good.


Especially now in the age of vibe coding...


My goal is to equip you with the skills necessary to see and understand the differences.



I will, in fact, claim that the difference between a bad programmer and a good one is whether they considers their code or their data structures more important. Bad programmers worry about the code. Good programmers worry about data structures and their relationships / algorithms.
–Linus Torvalds (creator of Linux)



For me, great algorithms are the poetry of computation. Just like verse, they can be terse, allusive, dense, and even mysterious. But once unlocked, they cast a brilliant new light on some aspect of computing.
–Francis Sullivan

Introduction

expectations

expectations

This is the third course in the Computer Science degree.

All of you are at least sophomores.

Therefore, you should know...

resources

You will need to refer to these resources frequently

Required Book

Electronic Resources

time

For any undergraduate course, you should expect to spend 2–3hrs outside class each week for each credit hour you are taking.

COS265 is 4hrs and will likely be at the upper end of that range.


Warning

In other words, plan to spend 13–17hrs/wk for this course!

3hrslecture (MWF)
2hrslab (T)
8–12hrshomework, reading


13–17hrstotal

electronics use

Mounting research indicates that electronics usage in classroom harms student's ability to retain and process information.

For example, although students that take notes using laptops tended to record more details, follow-up tests show that they processed and retained much less than those who took notes on paper.

Therefore, I have adopted a no-electronics-use policy.

During lecture time, you are not allowed to use a computer, even for taking notes.

Exception may be granted to those who write a 1-page argument.

See Electronics Usage Policy and Syllabus for more details.

mastery

Your goal should be to understand data structures and algorithms well enough that you can explain it clearly to me without any aid.

ai

AI can seem like an ally or someone who speaks with authority.

For this class, when it comes to AI, ...


I encourage you to use AI in the following ways.


Important

But use CAUTION and ALWAYS verify that it is correct!

The Matrix

ai

AI can seem like an ally or someone who speaks with authority...

For this class, when it comes to AI, ...


Do NOT use AI for anything related to the projects or labs.

The Matrix

What are you trying to tell me? That I can dodge bullets?
–Neo

No, Neo. I'm trying to tell you that when you're ready, you won't have to.
Morpheus🕶

The Matrix

You should be able to do all the following completely on your own:

The Matrix

disclosure

Regardless, ALWAYS disclose any outside help or collaboration, whether AI or peer.


Introduction

assessments

assessments

This course has several required deliverables


Be mindful of the due dates and times.

They are linked in Schedule and Brightspace.

You are responsible for turning in your own work on time.

projects

Generally, I post the projects while we are still covering the needed materials.

I do this so that you can

Projects are due Tuesday at 11:59pm

projects




Projects have implementation and documentation requirements.

projects: implementation

The implementation portion of projects will be graded by running your code against unit tests. A unit test is a pass/fail (binary) test.

Each gradeable item will have a set of unit tests, and the grade you receive is based on which of the tests passed.

Tests will run just after 6pm and midnight every day.

Warning

The tester will test only the code that was committed AND pushed to the CSE GitLab and for the issues that have been labeled ready for testing.

The tester will post the results as comments to the issues and update the labels to indicate score.

It is in your interest to start work early, to submit frequently, and to test as often as you can!

projects: implementation

You will receive full credit for your implementation only if it meets all requirements completely.

requirement correct
correctness results / output
performance time and memory
conformance code and API

Warning

Code that produces correct results but does not run within constraints (time, memory, API) will not receive full credit.


Important

Code that does not compile and run will receive a 0.

projects: implementation

The project write up will describe which packages you may import and what parts you may modify (typically the body of several functions)

In general, you are not allowed to modify the function's signature, such as return value, function name, argument types or ordering, which Exceptions are thrown, etc.


Warning

Submissions that use unauthorized packages or change the API will not receive full credit.

projects: documentation

Each project will require you to document and analyze your work.

This work is done in the readme.md Markdown file.


Info

Think of the readme.md file as a lab notebook that you would fill out in other science courses.


Warning

Some parts of each project might involve recording and calculating that can take a considerable amount of time.

projects: notes

A few additional important notes about projects...


Important

Start early! Ask questions!

Important

Projects will take longer than you expect! I guarantee that you will underestimate how much time it takes to finish these projects!

At 12–20hrs/project, waiting until a few days before it is due means either:

  1. your project is submitted unfinished, or
  2. you will be working for ≥15hrs solid

Important

In general, late submissions will not be accepted and extensions will not be granted.

labs

Labs are primarily used to...


We will occassionally have a lab exercise, perform a code review, or work on critical thinking, each of which are designed to be done during lab (maybe a couple hours outside).

labs: lab exercises

Lab Exercises will give you a chance to...

labs: coding reviews

Code Reviews will give you a chance to...

labs: critical thinking

metacognition explained
metacognition explained

Critical Thinking assignments will give you a chance to apply critical thinking skills to...


Below are the five skills on which we will focus

examinations




We will have two exams.


Both are:

examinations: oral exam

The first exam is an Oral Exam just after midterm.

It is structured to simulate a technical interview.

Covers only first half of material.

This exam should take no more than 30 minutes.

examinations: final exam

The second exam is a Final Exam taken during finals week.

It is structured similar to a standardized test like the GRE or ETS.

Covers whole semester of material.

This exam should take no more than 2 hours.

examinations: notes




The lowest exam grade will be dropped.



Info

You may use this feature to your benefit.

participation

Participation will be recorded through a variety of ways.

participation: interactive sessions

The interactive sessions will provide you hands-on experience with the material.

We plan to hold a session about every 2 or 3 weeks.

You each will get a deck of cards. Bring these cards with you to all lectures and labs.

participation: office hours and slack

Coming to office hours is a great way to get one-on-one help!

We will keep track of who comes in.


Slack is an online communication and collaboration environment that we will use for updates, questions, and answers.

You get participation points for asking and answering questions.


Important

If you are posting source code, you send your question as Direct Message (DM)!

participation: pop quizzes

Plickers is a quiz / survey tool that uses cards (paper clickers)

I have a Plicker card for you, where on the back is written your name, the name of this course, and four letters (A,B,C,D).

Bring this to every lecture and lab. If you lose it, let me know, and I will print another for you.

During each participation assessment, orient your card so that

participation: pop quizzes

As a backup, you may use the Mobile Plickers Card.

Let's set that up now...

course: COS265
number: see card
  1. tap save
  2. tap letter
  3. show code
  4. tap code
  5. add to home (opt)

quiz: current here-ness state

This is your first pop quiz... err... participation assessment!


Indicate using your Plicker card which best fits your current state.


  1. You are here mentally and physically.
  2. You are here mentally, but not physically.
  3. You are here physically, but not mentally.
  4. Other

grading

I use a 3pt grading system for COS 265 (and other courses)

Each gradeable item is scored 0–3 (or a scaled version). Assignments will have many gradeable items.

0 nothing of value was submitted F
1 submitted, but clearly not correct D-
2 not a 0, 1, or 3 C
3 perfect solution, meets every
requirement and expectation
A

Submitting nothing is clearly a 0. But also code that doesn't compile or doesn't run will likely result in a 0.

Code that runs but produces incorrect or unexpected output will likely get a 1.

See my grading philosophy for break-down

final grades

Final grades are weighted average of assessment category scores (table below), but with one exception...

assessment weight
projects 40%
labs 25%
exams 25%
participation 10%

Important

Exception: If any category is below C-, the final grade will be the lowest category grade.


This means earning a passing grade requires passing every part of the course; cannot make up low scores in one category with high scores (including extra credit) in another.

Introduction

final details

slides

The slides are provided in interactive format using HTML

They have been tested to run and look OK in Google Chrome and mostly OK in Firefox

There may be bugs. Let me know, and I will fix them.

accessibility

I am working on improving accessibility of materials.

Please let me know how I can improve it for you.

I plan to record all lectures.

Assignment write ups have built-in accessibility features.

help!

At the end of the term, you will fill out an evaluation.

Please be critical, letting me know what worked and what did not.

Read the assigned book readings, so I can know if they were helpful.

first project

The first project, P00_JavaIntro, is designed to introduce you to:

×