0% found this document useful (0 votes)
18 views43 pages

Lec01 Ab

Uploaded by

breaduc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views43 pages

Lec01 Ab

Uploaded by

breaduc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

CSE 250

Data Structures
Dr. Eric Mikida
[email protected]
208 Capen Hall

Lec 01: Course Overview


Course Staff
Eric Mikida Oliver Kennedy
Email: [email protected] Email: [email protected]
Office: Capen 208 (inside of 212 Capen) Office: Capen 211 (inside of 212 Capen)

Course SAs Emilie Griffin Jennifer Furdzik Milos Petrovic


Alex Kim Eric Xie Jonathan Guzman Robby Pruzan
Alex Terry Ethan Phan Jordan Wang Ronan Kasmier
Brendan O'Connell Eugenia Vance Joy Lee Shreyas Narayanan Sridhar
Chris Dearing Evan Jiang Julia Joseph Vipassana Khandare
Derek Gage Faizaan Mohammed Ali Marian Huynh Vrushaali Nagaraj
Doniyor Ismatilloev Isabel Kimos Matthew Bieniak Wonwoo Jeong

Office hours don't start until next week and will be posted to course website 2
Take the elevators next to 1Capen to 2, then turn right.
3
Logistics

● Course Website
○ https://cse.buffalo.edu/courses/cse250/2024-fa
○ All course materials, links, schedule, extra resources
● Course Forum (Piazza)
○ https://piazza.com/buffalo/fall2024/cse250
○ All discussion for the course is hosted here – check regularly
● AutoLab
○ https://autolab.cse.buffalo.edu/courses/cse250-f24
○ Assignment submission, grades
Please keep class discussions on Piazza (private/anonymous posts exist)
4
Always include [CSE 250] in the subject line when emailing
Development Environment
● Supported Operating Systems
○ MacOS
○ Ubuntu Linux
○ Windows + WSL/Ubuntu
● Supported Dev Environments
○ IntelliJ (Community Edition is Free)
○ PA0 walks you through the setup process

Other setups are ok, but the more your setup differs the lower the
chance we’ll be able to help you
5
Course Syllabus

6
Grading
Score (x) Letter Grade Quality
Points
Grade Breakdown: 90% ≤ x ≤ 100% A 4
85% ≤ x < 90% A- 3.67
● Assignments: 40%
80% ≤ x < 85% B+ 3.33
● Participation: 10%
75% ≤ x < 80% B 3
● Midterms: 15% x 2 = 30%
70% ≤ x < 75% B- 2.67
● Final Exam: 20% 65% ≤ x < 70% C+ 2.33
60% ≤ x < 65% C 2
55% ≤ x < 60% C- 1.67
50% ≤ x < 55% D 1
0% ≤ x < 50% F 0 7
Written Assignments
~Bi-Weekly Written Assignemnts
● Expect to spend about a week per assignment
● Submit up to 24hrs after deadline with a 50% penalty
You are responsible for submission formatting
● Submit only PDFs
● Submissions that do not load will receive a 0
We recommend writing solutions by hand
● Better retention of what you have written
● Easier to write out math by hand than on a computer

8
Programming Assignments
Grading for most programming assignments will be as follows:
● Test cases (5/30 points)
○ Due before implementation
● Implementation Correctness (20/30 points)
● Implementation Efficiency (5/30 points)
Grades will always be based on the LAST submission you make

9
Programming Assignments
You have 2-3 weeks per assignment
● Plan to start early and work throughout
● 25% penalty per day late, up to 48 hours
3 ‘grace days’ for the semester
● Applied automatically, even if your score does not increase

10
Exams
Two In-Class Midterms (Fri 10/4 and Fri 11/8, in class)
● More details as exams approach
One Final Exam (11/13/24 @ 8:00AM)
● Comprehensive, covering any topics from throughout the semester
● Check for conflicts ASAP
● If HUB changes the date/location…trust the HUB
If you need accommodations, contact Accessibility Resources ASAP

11
Class Participation
Lecture
● No recorded attendance
● Easy access to ask questions live (use it)
Recitation
● Attendance is mandatory (starting after add/drop)
● Recitation next week is optional for tech support
● Normal recitations begin the week of 9/9

12
Collaboration, AI, Extra Resources
Do…
● Work together to brainstorm ideas
● Explain concepts to each other
● Include a list of your collaborators on all submitted work
Do Not…
● Write solutions when working together
● Describe the details of solutions to problems or code
● Leave your code in a place where it is accessible to another student

When in doubt, ask a member of the course staff!

13
Resource Policy
Do…
● Use materials provided by course staff (Piazza, Class, OH)
● Use materials from the course lectures / recitations
● Cite all materials you reference for written work
● Cite sources for all code you reference / copy

14
Resource Policy
Do NOT…
● Reference random videos on YouTube that “helped you solve the problem”
● Hire “private tutors”
○ Save the money from Chegg
○ If you’re not doing the work yourself, you’re not learning
○ If you have an actual tutor, contact course staff
● Reference exact solutions found online

If you are caught using unauthorized resources, you get an F

15
Other Ways to Get an F
● Work in a group by assigning each person to a problem
● Copying your friend’s homework because you forgot
○ Each homework is not worth a lot on its own
● Sharing your homework with your friend
○ I have no way to know who did the work and who shared
● Submitting work without citations
○ Citing outside work will help you avoid AI repercussions
○ (we grade you on the work you did, but you won’t get an AI violation)

16
Other Ways to Get an F

You are liable/punishable if someone else


submits your work as their own.

17
Ways to Avoid an F
Don’t Cheat…but we understand mistakes are made.

We will grant amnesty for any AI violation IF you tell us about it BEFORE we
discover it

18
Asking Questions
First…check if the answer exists (syllabus, Piazza, course website)
Then…
Ask in lecture, recitation, Piazza, or office hours
Come prepared, form the question carefully, many times you will answer
your own question in the process!
Thinking through your question is a great first step.

19
Now…What even is
“Data Structures!?

20
What is a Data Structure?

Data
Container

21
What is a Data Structure?
SameD
ata Different
Container
more defensible

22
What is a Data Structure?
more efficient access to
skritches()
SameD
ata Different
Container

23
What is a Data Structure?

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


○ Array
○ LinkedList
○ ArrayList

● Store things organized by an attribute (“Map”, “Dictionary”)


○ Hash Table
○ Binary Search Tree
○ Red-Black Tree
24
Why should you care?

● Tactical: Optimize your Code (“reducing the constants”)


○ Understand the memory hierarchy
○ Understand the CPU / OS

● Strategic: Optimize your Design (“reducing the complexity”)


○ Understand how your algorithm scales
○ Understand repetition in your code
CSE 250
25
Tactical Programming
Go from point A to point B We can optimize each individual
1. Move up 100 feet step
2. Turn right, move forward 200 feet
3. Move north 10 feet then turn left ● For example, taking a bike will
4. Move forward 20 feet speed up step 2 compared to
5. Move south 50 feet walking
6. Move west 150 feet, then turn left
7. Move forward 60 feet

26
Strategic Programming
Look at the big picture
Design (not just implement) an
algorithm
Focus on "complexity"

27
Strategic Programming
Look at the big picture
Design (not just implement) an
algorithm
Focus on "complexity"

A B

28
Strategic Programming
Look at the big picture
Design (not just implement) an
algorithm
Focus on "complexity"

A B

Why not just move east 30 feet…


29
What is “Complexity”?

30
(screenshot: cppreference.com)
What is “Complexity”?

(screenshot: https://www.scala-lang.org/api) 31
What is “Complexity”?

Every (good) standard library’s provides guarantees on the


complexity of its data structures’ operations

Understanding complexity bounds can be the difference between


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

32
Analyzing Solutions

Get Nth Get First Prepend

Abstract Data Type

33
Analyzing Solutions
Option 1
● Very fast Prepend, Get First
● Very slow Get Nth
Option 2
● Very fast Get Nth, Get First Which is better?
● Very slow Prepend
Option 3
● Very fast Get Nth, Get First
● Occasionally slow Prepend
34
Analyzing Solutions
Option 1 (Linked List)
● Very fast Prepend, Get First
● Very slow Get Nth
Option 2 (Array) Which is better?
● Very fast Get Nth, Get First
● Very slow Prepend IT DEPENDS!

Option 3 (ArrayList…in reverse)


● Very fast Get Nth, Get First
● Occasionally slow Prepend
35
Some Common Ideas

More work now Storing Data

vs vs

More work later Computing Data

36
Analysis ADTs Data
Tools/Techniques Structures
Asymptotic Analysis,

Course
(Unqualified) Runtime
Bounds

Roadmap Sequence Array,


LinkedList

Amortized Runtime List ArrayList,


LinkedList

Recursive analysis, divide


and conquer,
Average/Expected Runtime

Stack, Queue ArrayList,


LinkedList

Midterm #1
37
Analysis ADTs Data
Tools/Techniques Structures
Review recursive analysis Graphs, EdgeList,

Course
PriorityQueue AdjacencyList,
AdjacencyMatrix

Roadmap Trees BST, AVL Tree,


Red-Black Tree,
Heaps

Midterm #2

Review expected runtime HashTables Chaining,


OpenAdressing,
Cuckoo Hashing

Miscellaneous

38
First Assignments

39
Academic Integrity Quiz
● Posted on AutoLab
● Should take < 10 minutes, unlimited attempts
● Due Sun Sept 8 @ 11:59PM
● YOU MUST GET 100% TO PASS THE COURSE

40
PA0
● Posted to course website (submission on AutoLab)
● Walks through setup of IntelliJ and GitHub
● Also covered in next weeks recitations
● Due Sun Sept 8 @ 11:59PM
● YOU MUST GET 100% TO PASS THE COURSE

41
Join Piazza
● Accept invites sent via email to join the course Piazza
● Read over @6 and @7

42
Questions?

43

You might also like