


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Exam; Class: Object-Oriented Programming and Data Structures; Subject: Computer Science; University: Cornell University; Term: Fall 2008;
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



2
" Thursday, Dec 18 " 2 - 4:30pm " Uris Auditorium
" Wednesday, Dec 17 " 7:30 - 9pm and 9 - 10:30pm " Upson B " Both sessions the same " Maybe an extra one Tuesday of next week - watch web site for an announcement
" Notify Kelly Patwell today " You must provide
" Two exams at the same time or " Three or more exams within 24 hours
" Sorry, no more extensions 3
" We're recruiting next-semester consultants for CS1110 and CS " Interested students should fill out an application, available in 303 Upson
" Consulting ends this week " Office hours continue until Final Exam
have exams, too)
on the course website 4
" Will count as 1% of your course grade " This is a regular point, not a bonus point " Anonymity
responses, but no link between names & responses
" This link also appears on the CS2110 announcements page
understand the ideas rather than to become a Java expert " Recursion " Object-Oriented Programming " Interfaces " Graphical User Interfaces (GUIs)
with a set of tools that are widely useful " Induction " Asymptotic analysis (big-O) " Arrays, Trees, and Lists " Searching & Sorting " Stacks & Queues " Priority Queues " Sets & Dictionaries " Graphs
" Stack frames " Exceptions
" Classes and objects " Primitive vs. reference types " Dynamic vs. static types " Subtypes and Inheritance
" Inner & anonymous classes
" Type hierarchy vs. class hierarchy " The Comparable interface " Iterators & Iterable
" Components, Containers, & Layout Managers " Events & listeners
7
! Induction ! Grammars & parsing ! Asymptotic analysis (big-O) " Solving recurrences " Lower bounds on sorting ! Basic building blocks " Arrays " Lists
" Trees
! Searching " Linear- vs. binary-search ! Sorting " Insertion-, Selection-, Merge-, Quick-, and Heapsort ! Useful ADTs (& implementations) " Stacks & Queues
" Priority Queues
" Sets & Dictionaries
" Graphs... 8
" Adjacency matrix " Adjacency list
" Prim’s algorithm (growing a single tree) " Kruskal’s algorithm (build a forest by adding edges in order)
10 Complexity of Bounded-Degree Euclidean MST
" Given n points in the plane, determine the MST " Can be solved in O(n log n) time by first building the Delaunay Triangulation
" Given n points in the plane, determine a MST where each vertex has degree! d
[Papadimitriou & Vazirani 84]
greater ! Can show Euclidean MST has degree! 5
" Is there an algorithm with runtime close to the "(n log n) lower bound?
" But for Euclidean distances on points, the number of edges is n(n-1)/
How long does it take to a sort an n-by-n table of numbers? ! O(n^2 log n) because there are n^2 numbers in the table ! What if it’s an addition table? " Shouldn’t it be easier to sort than an arbitrary set of n^2 numbers? ! There is a technique that uses just O(n^2 ) comparisons [Fredman 76] " (^) But it uses O(n^2 log n) time to decide which comparisons to use [Lambert 92] ! This problem is closely related to the problem of sorting the vertices of a line arrangement n-by-n
Good luck on the final! Thanks for an enjoyable semester! Have a great winter break!