L20cs2110fa08

L20cs2110fa08 - Threads and Concurrency Lecture 20 CS2110...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Threads and Concurrency Lecture 20 – CS2110 – Fall 2008
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Prelim 2 Reminder Prelim 2 Tuesday 18 Nov, 7:30-9pm Uris Auditorium One week from today! Topics: all material up to and including this week's lectures Includes graphs Exam conflicts Email Kelly Patwell (ASAP) Prelim 2 Review Session Sunday 4/15,1:30-3pm Upson B17 Individual appointments are available if you cannot attend the review session (email one TA to arrange appointment) Old exams are available for review on the course website
Background image of page 2
3 Prelim 2 Topics Asymptotic complexity Searching and sorting Basic ADTs stacks queues sets dictionaries priority queues Basic data structures used to implement these ADTs arrays linked lists hash tables binary search trees heaps Know and understand the sorting algorithms From lecture From text (not Shell Sort) Know the algorithms associated with the various data structures Know BST algorithms, but don’t need to memorize balanced BST algorithms Know the runtime tradeoffs among data structures Don’t worry about details of API But should have basic understanding of what’s available
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Prelim 2 Topics Language features inheritance inner classes anonymous inner classes GUI statics layout managers components containers GUI dynamics events listeners adapters
Background image of page 4
5 Data Structure Runtime Summary O(1) worst-case time Array (but can overflow) Linked list O(1) time/operation Array with doubling O(1) worst-case time Array (but can overflow) Linked list (need to keep track O(1) time/operation Array with doubling Priority Queue [ops = insert & getMin] O(1) worst-case time if set of priorities is bounded One queue for each priority O(log n) worst-case time Heap (but can overflow) O(log n) time/operation Heap (with doubling) O(n) worst-case time Unsorted linked list Sorted linked list (O(1) for getMin) Unsorted array (but can overflow) Sorted array (O(1) for getMin, but can overflow)
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Data Structure Runtime Summary (Cont’d) Set [ops = insert & remove & contains] O(1) worst-case time Bit-vector (can also do union and intersect in O(1) time) O(1) expected time Hash table (with doubling & chaining) O(log n) worst-case time Balanced BST O(n) worst-case time Linked list Unsorted array Sorted array (O(log n) for contains) Dictionary [ops = insert(k,v) & O(1) expected time Hash table (with doubling & chaining) O(log n) worst-case time Balanced BST O(log n) expected time Unbalanced BST (if data is sufficiently random) O(n) worst-case time Linked list Unsorted array Sorted array (O(log n) for contains)
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/01/2010 for the course CS 2110 at Cornell.

Page1 / 41

L20cs2110fa08 - Threads and Concurrency Lecture 20 CS2110...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online