CS 2420
Introduction to Algorithms & Data Structures
Instructor: Paymon Saebi
Clicker questions and answers
Clicker Review
Recursion is always safe and we can make as many recursive
calls as needed to accomplish our goal.
Yes
No
Answer: No
Each recursi
We give two solutions for this problem. The rst solution is a divide and conquer algo
rithm, which is easier to think of. The second solution is a clever linear time algorithm.
Via divide and conquer: Let 61, . . . , 6, denote the equivalence classes of t
INHERITENCE, POLYMORPHISM, INTERFACES
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-TA ofce
hours posted
-assignment
-clickers
1 due on Thursday at 5pm
start on Tuesday
3
last time
4
-a
variable is a piece of dat
JAVA REVIEW
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-Lab
0 posted
-getting started with Eclipse
-Java refresher
-this will not count towards your grade
-TA ofce
hours today, 12:15-5pm
-help
sessions this Fri
Generics & Comparators
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
MOCK INTERVIEW
WORKSHOP
JANUARY 28 6:00-7:30 PM
TH
CAREER SERVICES, 3RD FLOOR OF SSB
A great interview is critical to land that job or Internshi
ALGORITHM ANALYSIS
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-assignment
2 is due Friday at midnight
-note change in due date, and time
-tutoring
experiment
http:/doodle.com/89cbb4u5n5acy9ag
3
clickers!
4
5
6
COLLECTIONS & ITERATORS
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-assignment
2 is due tomorrow at midnight (11:59pm)
-next
assignment goes out today
-due Thursday at midnight
-requires a partner!
-tutoring
ex
BASIC SORTING, PART 2
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-assignment
3 is due tonight at midnight (11:59pm)
-assignment
4 is out later today
-requires pair programming
-due next Thursday
-midterm
1 in t
INTRO TO SORTING
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-assignment
3 is due Thursday at midnight (11:59pm)
-tutoring
-Doodle
polls up on the website
3
assignment 1 scores
140
124
number of students
120
100
MERGESORT & QUICKSORT
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
administrivia
2
-assignment
4 due tonight at midnight
-assignment
5 is out
-midterm
next Tuesday
3
last time
4
recursion
[ri-kur-zhuh n]
noun
see recursion.
5
-r
1
RECURSION
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
2
administrivia
3
-assignment
-a
4 due on Thursday at midnight
personal testimony
-no
change of due dates for homework
-midterm
next Tuesday
4
last time
6
selection vs inser
CS 2420: Introduction to Algorithms and Data
Structures
Spring 2013
Prociency Quiz
This quiz will not count toward your grade for this course. It is designed to evaluate your preparedness for this course. It will also serve to give me an idea of what I ne
CS 2420: Introduction to Algorithms and Data
Structures
Sample Problems
Midterm 1
Read each problem carefully. Read these directions carefully.
These problems do not represent the diculty of the real exam. This is not a practice test, just a
set of the ty
Sorting Algorithms
/ Sorts the input array using selection sort
public static void selectionSort(int[] nums) cfw_
int minIndex;
int numSteps = 0;
/ For every item in the unsorted array
for(int i = 0; i < nums.length; i+) cfw_
!
minIndex = i;
!
/ Find the
CS 2420
Introduction to Algorithms & Data Structures
Instructor: Paymon Saebi
Lecture 3 Thursday, May 23, 2013
Quick Question
Do you have and use any web-enabled devices in class?
(Devices such as tablets, smartphones, laptops, etc.)
A) Yes
B) No
Today
CS 2420
Introduction to Algorithms & Data Structures
Instructor: Paymon Saebi
Lecture 4 Thursday, May 23, 2013
Clicker Review
What happens after we compile/run the following snippet if the
user choice was 1 (1 was passed in as a r g s [ 0 ] )
1. Compiler
CS 2420
Introduction to Algorithms & Data Structures
Summer 2013
Instructor: Paymon Saebi
GREETINGS
Staff Introduction
Welcome to this condensed summer version
My name is Paymon Saebi [pemn sb] (pay-mon saw-eh-be)
We have three awesome TAs
Jason Davis
Final Exam
1
True/False (2 pts each):
1.
In a quadtree every node stores links to two children.
2.
Specular highlights are independent of viewing direction.
3.
A good hash function often involves prime numbers.
4.
The heap-order property requires that eve
University of Utah
School of Computing
CS 2420
April 26, 2009
Example Final Examination
This is an example of the nal examination that will be given on Wednesday, May 6 in the classroom. It
is the exact exam, except that I have removed portions of the que
INTRODUCTION
cs2420 | Introduction to Algorithms and Data Structures | Spring 2015
1
today
2
-meet
the teaching staff
-what
is this course about?
-why
should you care?
-nuts
& bolts
-good
coding practice
3
meet the teaching staff
4
dad buys a Commodore64