CSE 373
Winter 2011
Final
1. Sorting
Given the following array of int elements:
/ index
0
1
2
3
4
5
6
7
8
9
int numbers = cfw_6, 7, 4, 8, 11, 1, 10, 3, 5, 9;
a. Show the state of the elements after 5 passes of the outermost loop of selection sort.
b. Show
Name:
CSE373 Fall 2013, Final Examination
December 10, 2013
Please do not turn the page until the bell rings.
Rules:
The exam is closed-book, closed-note, closed calculator, closed electronics.
Please stop promptly at 4:20.
There are 114 points total,
Name: _ Email address: _
CSE 373 Sample Final Exam
(closed book, closed notes, calculators o.k.)
Instructions Read the directions for each question carefully before answering. We may give partial credit based on the work you write down, so if time permits
Name: _
Email address: _
CSE 373 Sample Final Exam
(closed book, closed notes, calculators o.k.)
Instructions Read the directions for each question carefully before answering. We may
give partial credit based on the work you write down, so if time permits
PHYSICS
LECTURE NOTES
PHYS 395
ELECTRONICS
c D.M. Gingrich
University of Alberta
Department of Physics
1999
Preface
Electronics is one of the fastest expanding elds in research, application development and
commercialization. Substantial growth in the eld
Java Basics
CSE 373, Fall 2015
Megan Hopp
Definitions
Object
Class
A class can be defined as a template/ blueprint that describes the behaviours/states that
object of its type support
Method
Objects have states and behaviors. Objects are instances of clas
CSE 373: Homework 2
Heaps and Big O
Due: April 12th, 11:59 PM to Canvas
Introduction
In this assignment, you will implement the Priority Queue ADT (represented by the PriorityQueue.java interface). You will do this by creating your own BinaryHeap class th
CSE 373: Practice Final
1
Short Answer
a) Provide two orderings [0,1,2,3,4,5,6,7] that are worst-case for quick sort. Assume that
you select the first element as the pivot. Explain why this is the worst-case. You do
not have to perform the quicksort
b) Ex
CSE 373
MAY 12 TH MINIMUM SPANNING TREES
ASSORTED MINUTIAE
HW5 is out
Write up has a Minimum spanning tree
question, which were covering today
Code due next Wednesday, as usual, Write
up will be due on Friday.
H2 finally graded
10 or so students no g
CSE 373
MAY 22 ND EVEN MORE SORTING
ASSORTED MINUTIAE
HW6 out tonight Due next Tuesday at
midnight
ASSORTED MINUTIAE
HW6 out tonight Due next Tuesday at
midnight
Extra assignment Due next Friday, last day
of class
ASSORTED MINUTIAE
HW6 out tonight Due
1
Amortization
I will start with an amortization analogy: In order to go attend classes at the university you must
a sum of tuition. We can think of tuition in two ways. We can think of very first day of class as
disproportionally expensive, and the rest
CSE 373: Homework 1
Queues and Testing
Due: April 5th, 11:59 PM to Canvas
Introduction
This homework will give you an opportunity to implement the Queue ADT over a linked
list data structure. Additionally, it will introduce you to basic concepts of behavi
CSE 373
JUNE 2ND EXAM REVIEW
ASSORTED MINUTIAE
Exam Review Today 4:30 6:00 EEB 105
HWs 5 and 6 back this weekend
Submit regrade requests for before exam
time
Old patches gone through, recheck grades
Extra assignment due tonight at midnight
No late d
Amortized Runtime
When calculating amortized runtime, your goal is to compare the total cost of a series of
operations with how many of those operations happened. The intuition here is that you
want to build up enough credit with a series of cheap operati
CSE 373
MAY 5 TH MORE GRAPHS
MINUTIAE
HW4 is out
Exam regrades until 4:30 after class
today
Also available through next week
Exams not picked up are in my office
EXCEPTIONS
HW4 requires exception throwing
https:/docs.oracle.com/javase/tutorial/
esse
CSE 373
MAY 1 ST HASHING CONCLUSION
EXAM RESULTS
Overall, you did very well
Average in the mid-80s
ADT vs Data Structure
Algorithm Analysis
Rigor for final exam
EXAM RESULTS
If you did poorly on this exam,
Thats okay, but we should talk about
what
CSE 373: Homework 5
Dijkstras Algorithm
Code due: May 17th, 11:59 PM to Canvas
Writeup due: May 19th: 11:59 PM
Introduction
For this assignment, you will use your graph representation from HW4 to implement Dijkstras algorithm for finding shortest paths. Y
CSE 373
APRIL 19 TH AVL OPERATIONS
ASSORTED MINUTIAE
HW2 code grades out tonight
HW3 due tonight
Last HW before midterm
Exam review
Next Wednesday (in class)
Options for TA review session out tonight
TODAYS LECTURE
AVL Trees
Balance
Implementatio
CSE373: Data Structures & Algorithms
Optional Slides: AVL Delete
Dan Grossman
Fall 2013
The AVL Tree Data Structure
Structural properties
1. Binary tree property
2. Balance property:
balance of every node is
between -1 and 1
Result:
Worst-case depth is
O(
CSE373: Data Structures and Algorithms
Lecture 1: Introduction; ADTs; Stacks/Queues
Dan Grossman
Fall 2013
Welcome!
We have 10 weeks to learn fundamental data structures and
algorithms for organizing and processing information
Classic data structures / a
CSE373: Data Structures & Algorithms
Lecture 4: Dictionaries; Binary Search Trees
Dan Grossman
Fall 2013
Where we are
Studying the absolutely essential ADTs of computer science and
classic data structures for implementing them
ADTs so far:
1.
2.
Stack:
Qu
CSE373: Data Structures & Algorithms
Lecture 5: AVL Trees
Dan Grossman
Fall 2013
The AVL Tree Data Structure
Structural properties
1. Binary tree property
2. Balance property:
balance of every node is
between -1 and 1
Result:
Worst-case depth is
O(log n)
CSE373: Data Structures and Algorithms
Lecture 3: Asymptotic Analysis
Dan Grossman
Fall 2013
Gauging performance
Uh, why not just run the program and time it
Too much variability, not reliable or portable:
Hardware: processor(s), memory, etc.
OS, Java ve
CSE373: Data Structures and Algorithms
Lecture 2: Math Review; Algorithm Analysis
Dan Grossman
Fall 2013
Today
Finish discussing stacks and queues
Review math essential to algorithm analysis
Proof by induction
Powers of 2
Binary numbers
Exponents and
CSE 373
MAY 10 TH SPANNING TREES AND
UNION FIND
COURSE LOGISTICS
HW4 due tonight, if you want feedback by
the weekend
COURSE LOGISTICS
HW4 due tonight, if you want feedback by
the weekend
HW5 out tomorrow morning
COURSE LOGISTICS
HW4 due tonight, if y
CSE 373
APRIL 19 TH AVL OPERATIONS
ASSORTED MINUTIAE
Exam review
Wednesday evening (Canvas
announcement)
Regrade requests for HW2 by end of day
Monday
TODAYS LECTURE
Finish AVL Trees
Proof
Memory analysis
Framework and concept
REVIEW
AVL Trees
BS
CSE 373
MAY 19 TH EVEN MORE SORTING
ASSORTED MINUTIAE
HW5 Due Tonight Code + Writeup
ASSORTED MINUTIAE
HW5 Due Tonight Code + Writeup
HW6 Out Monday Covers Sorting
ASSORTED MINUTIAE
HW5 Due Tonight Code + Writeup
HW6 Out Monday Covers Sorting
Extra
CSE 373
MAY 26 TH NON-COMPARISON SORTING
ASSORTED MINUTIAE
HW6 Out Due next Wednesday
No Java Libraries
ASSORTED MINUTIAE
HW6 Out Due next Wednesday
No Java Libraries
Two exam review sessions
Wednesday: 1:00 2:20 CMU 120
Friday: 4:30 6:20 EEB 105
T
CSE 373
APRIL 24 TH HASHING
EXAM FRIDAY
Practice exam after class today
Topics:
Stacks and Queues
BigO Notation and runtime Analysis
Heaps
Trees (BST and AVL)
Traversals
Design Tradeoffs
EXAM FRIDAY
Format
No note sheet
One section of short answer
4-5
CSE 373
MAY 3 RD HASHING & GRAPHS
ASSORTED MINUTIAE
Exams are in my office, you can pick
them up during any of my office hours.
HW4 out tomorrow morning
Regrade requests processed
H2P2 and H3P1 will be back next week
Finishing discussion on hashing t