0% found this document useful (0 votes)
20 views77 pages

Lec01 c0

Uploaded by

breaduc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
20 views77 pages

Lec01 c0

Uploaded by

breaduc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 77

CSE 250: Course Overview, Logistics

CSE 250: Course Overview, Logistics


Lecture 1

Aug 26, 2023

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Who are we?

Hi, I’m Oliver.


[email protected]
I study how people interact with data (spreadsheets).
I make data go vroom (compilers, data structures).
I’ve been teaching data structures for 4 years.
I do western martial arts .
I bike … a lot .

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Who are we?


Oliver Kennedy Eric Mikida
[email protected] [email protected]
Where: Capen 211 (in Capen 212) Where: Capen 208 (in Capen 212)
Office Hours: Fri 10:00-11:30 Office Hours: Tue 3:30-5 PM;
Wed 11:00-1:00
Alex Kim Evan Jiang Matthew Bieniak
Alex Terry Faizaan Mohammed Ali Milos Petrovic
Brendan O’Connell Isabel Kimos Robby Pruzan
Chris Dearing Jennifer Furdzik Ronan Kasmier
Derek Gage Jonathan Guzman Shreyas Narayanan
Sridhar
Doniyor Ismatilloev Jordan Wang
Vipassana Khandare
Emilie Griffin Joy Lee
Vrushaali Nagaraj
Eric Xie Julia Joseph
Wonwoo Jeong
Ethan Phan Marian Huynh
Eugenia Vance

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Finding Capen 212

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Logistics

Course Forums: Piazza


https://piazza.com/buffalo/fall2024/cse250
Course Website / Syllabus:
https://cse.buffalo.edu/courses/cse250/2024-fa
Assignment Submission: Autolab
https://autolab.cse.buffalo.edu/courses/cse250-f24/
Assignment Distribution: Github Classroom

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Logistics

Course Forums: Piazza


https://piazza.com/buffalo/fall2024/cse250
Course Website / Syllabus:
https://cse.buffalo.edu/courses/cse250/2024-fa
Assignment Submission: Autolab
https://autolab.cse.buffalo.edu/courses/cse250-f24/
Assignment Distribution: Github Classroom
Please keep discussions on Piazza (use private posts if necessary)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Logistics

Course Forums: Piazza


https://piazza.com/buffalo/fall2024/cse250
Course Website / Syllabus:
https://cse.buffalo.edu/courses/cse250/2024-fa
Assignment Submission: Autolab
https://autolab.cse.buffalo.edu/courses/cse250-f24/
Assignment Distribution: Github Classroom
Please keep discussions on Piazza (use private posts if necessary)
Always include [CSE-250] on the subject line when emailing

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Development Environment

Supported Operating Systems


MacOS
Ubuntu Linux
Windows + WSL/Ubuntu
Supported Development Environments
IntelliJ

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview

Development Environment

Supported Operating Systems


MacOS
Ubuntu Linux
Windows + WSL/Ubuntu
Supported Development Environments
IntelliJ

Other setups are ok, but the more your setup differs, the less we’ll be
able to help you.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Syllabus

https://cse.buffalo.edu/courses/cse250/2024-fa

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Grading

Grade Breakdown Score (x) Letter Grade Quality Points


90% ≤ x ≤ 100% A 4
Assignments 40% 85% ≤ x < 90% A- 3.67
(5%. each) 80% ≤ x < 85% B+ 3.33
75% ≤ x < 80% B 3
Participation 10% 70% ≤ x < 75% B- 2.67
65% ≤ x < 70% C+ 2.33
2 Midterms 15% each 60% ≤ x < 65% C 2
55% ≤ x < 60% C- 1.67
Final Exam 20% 50% ≤ x < 55% D 1
0% ≤ x < 50% F 0

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Written Assignments

∼Bi-Weekly Written Assignments


Expect to spend about a week working on it
Submissions allowed up to a day late (50% penalty)
You are responsible for submission format
Submit only PDFs
Submissions that can’t be read will receive a 0
We recommend writing solutions by hand
Handwritten work is retained more effectively
It’s easier to write out math by hand

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Programming Assignments

Typical Programming assignment


Write Test Cases (5/30 points)
Due before implementation
Implementation Correctness (20/30 points)
Implementation Efficiency (5/30 points)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Programming Assignments

Typical Programming assignment


Write Test Cases (5/30 points)
Due before implementation
Implementation Correctness (20/30 points)
Implementation Efficiency (5/30 points)

Your grade is based on the last submission you make.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Assignments

You have 2-3 weeks per assignment


Plan to start early and work throughout
25% penalty per day late
Assignment schedule on course site
Let us know early if you have conflicts.
You 3 ‘grace days’ for the semester
Applied automatically, even if your score does not increase

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Assignments

You have 2-3 weeks per assignment


Plan to start early and work throughout
25% penalty per day late
Assignment schedule on course site
Let us know early if you have conflicts.
You 3 ‘grace days’ for the semester
Applied automatically, even if your score does not increase

Course staff have lives (yep, it’s true).


Do not expect help after 5 PM on the Friday before it is due.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Exams

In-Class Midterms (Fri 10/4 and Friday 11/8, in class)


More details as exams approach
One Final Exam (12/13 at 8 AM)
Comprehensive exam (all topics are fair game)
Check for conflicts ASAP
If HUB updates, trust the date in HUB

Please contact Accessibility Resources for accommodations


https://www.buffalo.edu/studentlife/who-we-are/departments/accessibility.html

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Syllabus Review

Attendance / Participation

Lecture
No recorded attendance
We’re here to answer questions (use the opportunity!)
Recitation
Attendance is mandatory after add/drop
Recitation next week is optional for tech support
Normal recitations begin the week of 9/9

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Collaboration

Do...
... work together to brainstorm ideas
... explain concepts to each other
... include a list of collaborators on all submitted work
Do not...
... write solutions while working together
... describe the details of solutions or code
... leave your code in a place where someone else can see it

If in doubt, ask a member of the course staff.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Resource Policy

Do...
... use materials provided by course staff (Piazza, Class, OH)
... use materials provided by textbooks, readings
... cite materials you reference for written work
... cite sources for all code you reference/copy

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Resource Policy

Do not...
... reference random videos that “helped you solve the
problem”
... reference exact solutions found online
... use LLMs/Chatbots/etc...
... hire “private tutors”

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Resource Policy

Do not...
... reference random videos that “helped you solve the
problem”
... reference exact solutions found online
... use LLMs/Chatbots/etc...
... hire “private tutors”
If you have an actual tutor, please contact course staff.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Why?

This is an intro-level course. You’re learning.


If you don’t understand, you will struggle with later courses
(e.g., 331).
If someone else does the work, you’re not the one that
understands.
We want you to understand the pieces, so that you can
(eventually) start fitting them together in clever ways.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Why?

This is an intro-level course. You’re learning.


If you don’t understand, you will struggle with later courses
(e.g., 331).
If someone else does the work, you’re not the one that
understands.
We want you to understand the pieces, so that you can
(eventually) start fitting them together in clever ways.
If we catch you cheating, you get an F.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Other Ways to Get an F

Work in a group by assigning each person to a problem.


Copy a friend’s homework because you forgot (∼1% of your
grade is not worth it)
Share your homework with your friend (I can’t tell who copied)
Submit work without citations (Cited work included in your
project is not an AI violation)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Other Ways to Get an F

Work in a group by assigning each person to a problem.


Copy a friend’s homework because you forgot (∼1% of your
grade is not worth it)
Share your homework with your friend (I can’t tell who copied)
Submit work without citations (Cited work included in your
project is not an AI violation)
(Although we will grade you on the work you did)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

You are liable if someone else submits your work as their


own.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Amnesty Policy

Don’t cheat!

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Amnesty Policy

Don’t cheat! ... but we understand that mistakes happen.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Amnesty Policy

Don’t cheat! ... but we understand that mistakes happen.


You may retract any work you submit, at any time before we
discover that it contains an AI violation.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Amnesty Policy

Don’t cheat! ... but we understand that mistakes happen.


You may retract any work you submit, at any time before we
discover that it contains an AI violation.

Dear Dr. Kennedy,

In order to preserve academic integrity in CSE


250, I would like to withdraw my submission for
Project/Homework XXX.

Sincerely,
Name ([email protected])

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Collaboration

Life Lesson

If ChatGPT can do your work... you will not be employable for


very long.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
How to ask questions?

When to Ask Questions

In Class (raise your hand1 )


Piazza (Ask anytime!)
Office Hours (All the TAs have been where you’ve been)
Recitations (... if you prefer smaller, less intimidating settings)

1
Oliver’s slides always have small mistakes ‘to make sure that you’re paying
. . . . . . . . . . . . . . . . . . . .
attention’.
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
How to ask questions?

How to Ask Questions

To ask a question...
Check if the answer already exists
(syllabus, Piazza, course site)
Frame your question carefully.
(Avoid phrases like “it’s not working”)
Let the SA/Instructor know what you tried.
(Try to solve the problem yourself before asking)
Copy and paste text error messages, and not screenshots
(Piazza can’t search images)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
How to ask questions?

How to Ask Questions

To ask a question...
Check if the answer already exists
(syllabus, Piazza, course site)
Frame your question carefully.
(Avoid phrases like “it’s not working”)
Let the SA/Instructor know what you tried.
(Try to solve the problem yourself before asking)
Copy and paste text error messages, and not screenshots
(Piazza can’t search images)

Often, if you follow the steps above, you’ll find that you can answer
your own question in the process!

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

Data

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

Data Container

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

Different Container (More Defensible) Same Data

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

Different Container (More efficient skriches()) Same Data

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

So what is a data structure?

A thing to put your things in.


Why?
1 Which is easier to find stuff in: an organized or a messy room?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

So what is a data structure?

A thing to put your things in.


Why?
1 Which is easier to find stuff in: an organized or a messy room?
2 Which is easier to maintain?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
What is a Data Structure?

Examples of Data Structures

Store a list of things in some order (”List”)


Array
Linked List
ArrayBuffer
Store things organized by an Attribute (”Map”, ”Dictionary”)
Hash Table
Binary Search Tree
Red-Black Tree

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?

How do I make my code efficient?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?

How do I make my code efficient?

Tactical: Optimize your Code


Understand the memory hierarchy
Understand the CPU/OS

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?

How do I make my code efficient?

Tactical: Optimize your Code


Understand the memory hierarchy
Understand the CPU/OS
Strategic: Optimize your Algorithm
Understand how your algorithm scales
Avoid repetition in your code

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?

How do I make my code efficient?

Tactical: Optimize your Code


Understand the memory hierarchy
Understand the CPU/OS
Strategic: Optimize your Algorithm
Understand how your algorithm scales
Avoid repetition in your code
CSE 250 focuses on optimizing algorithms

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Tactical Programming
Go from point A to point B
1 Move up 100 feet
2 Turn right, move forward
200 feet
3 Move north 10 feet then
turn left
4 Move forward 20 feet
5 Move south 50 feet
6 Move west 150 feet, then
turn left
7 Move forward 60 feet

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Tactical Programming
Go from point A to point B
1 Move up 100 feet
2 Turn right, move forward We can optimize each
200 feet individual step
3 Move north 10 feet then
turn left
4 Move forward 20 feet
5 Move south 50 feet
6 Move west 150 feet, then
turn left
7 Move forward 60 feet

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Tactical Programming
Go from point A to point B
1 Move up 100 feet
2 Turn right, move forward We can optimize each
200 feet individual step
3 Move north 10 feet then Taking a bike will speed up
turn left step 2 compared to walking.
4 Move forward 20 feet
5 Move south 50 feet
6 Move west 150 feet, then
turn left
7 Move forward 60 feet

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Tactical Programming
Go from point A to point B
1 Move up 100 feet
2 Turn right, move forward We can optimize each
200 feet individual step
3 Move north 10 feet then Taking a bike will speed up
turn left step 2 compared to walking.
4 Move forward 20 feet Installing an east/west
5 Move south 50 feet slip-and-slide will speed up
6 Move west 150 feet, then step 6.
turn left
7 Move forward 60 feet

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Strategic Programming

Look at the big picture


Design an algorithm
Focus on “complexity”

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Strategic Programming
× ×

× ×
Look at the big picture
× ×
Design an algorithm
Focus on “complexity” A B

. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Strategic Programming
× ×

× ×
Look at the big picture
× ×
Design an algorithm
Focus on “complexity” A B

Why not just move east 30 feet...

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Some Examples

Demo

Live Demo
(thanks to Prakshal Jain; 2021 TA for the suggestion/prototype)

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Know Arcane Lore, Amaze Your Friends

C++ Standard Library

https://en.cppreference.com/w/cpp/container/unordered_map
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Know Arcane Lore, Amaze Your Friends

C++ Standard Library

https://en.cppreference.com/w/cpp/container/unordered_map
. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Know Arcane Lore, Amaze Your Friends

Java’s Util

https://docs.oracle.com/javase/7/docs/api/
. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Know Arcane Lore, Amaze Your Friends

Complexity Lore

Every (good) standard data structure library provides guarantees


on the complexity of its data structures’ operations

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Why should I care?
Know Arcane Lore, Amaze Your Friends

Complexity Lore

Every (good) standard data structure library provides guarantees


on the complexity of its data structures’ operations

Understanding complexity can be the difference between code that


runs in 6 hours vs code that runs in 8 seconds.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Containers

We have
A list of cats
We want
To get the first cat in the list
To add a new cat to the front of the list
To get the nth cat in the list

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Containers

We have
A list of cats
We want
To get the first cat in the list
To add a new cat to the front of the list
To get the nth cat in the list

This is an abstract data type

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Abstract Datatypes

Stuff you store (data)


A list of cats
Operations you can perform on the stored stuff
To get the first cat in the list
To add a new cat to the front of the list
To get the nth cat in the list

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

So how do we store our list of cats?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Options

1 Very Fast: Prepend, Get First


Very Slow: Get Nth

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Options

1 Very Fast: Prepend, Get First


Very Slow: Get Nth
2 Very Fast: Get Nth, Get First
Very Slow: Prepend

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Options

1 Very Fast: Prepend, Get First


Very Slow: Get Nth
2 Very Fast: Get Nth, Get First
Very Slow: Prepend
3 Very Fast: Prepend, Get First
Sometimes Slow: Prepend

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Options

1 Very Fast: Prepend, Get First


Very Slow: Get Nth
2 Very Fast: Get Nth, Get First
Very Slow: Prepend
3 Very Fast: Prepend, Get First
Sometimes Slow: Prepend

Which is best?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Options

1 Very Fast: Prepend, Get First Linked List


Very Slow: Get Nth
2 Very Fast: Get Nth, Get First Array
Very Slow: Prepend
3 Very Fast: Prepend, Get First ArrayBuffer (reversed)
Sometimes Slow: Prepend

Which is best?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

It Depends!
No one option is always best!

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Containers

Some Common Ideas

More work now Storing Data

vs vs

More work later Computing Data

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Course Roadmap

Course Roadmap - Part 1


Analysis Tools/Techniques ADTs Data Structures
Asymptotic Analysis
(Unqualified) Runtime Bounds
Sequence Array, Linked List
Amortized Runtime List ArrayList, LinkedList
Recursive Analysis
Divide and Conquer
Average/Expected Runtime
Stack, Queue ArrayList, LinkedList
Midterm 1

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Course Roadmap

Course Roadmap - Part 2


Analysis Tools/Techniques ADTs Data Structures
Revisit Recursive Analysis Graphs Edge List,
PriorityQueue Adjacency List,
Adjacency Matrix
Trees BST, AVL Tree,
Red-Black Tree,
Heaps
Midterm 2
Review Expected Runtime Hash Tables Chaining,
Open Addressing,
Cuckoo Hashing
Misc Topics/Buffer
Final Exam

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Next steps...

AI Quiz

Log into autolab; it will take you under 10 minutes.

Due Sun, Sept 8 at 11:59 PM

Successfully completing the AI exam with a passing grade is


mandatory. If you don’t get 100% by the deadline, you get an ’F’.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Next steps...

Java Hello World Project

Posted on course website; Submit a java program that prints out


your github username.

Due Sun, Sept 8 at 11:59 PM

This project does not count for a grade, but you must get a 100%
to pass the class.

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Next steps...

Join Piazza

Accept emailed invites to join the course Piazza


Read over @6 and @7

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .
CSE 250: Course Overview, Logistics
Course Overview
Next steps...

Questions?

. . . . . . . . . . . . . . . . . . . .
© 2023 Oliver Kennedy, Eric Mikida, The University at Buffalo, SUNY
. . . . . . . . . . . . . . . . . . . .

You might also like