DOC PREVIEW
WSU CPTS 223 - Advanced Data Structures

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Advanced Data Structures2TopicsData structuresstack, list, arrayTrees, heaps, union-find, hash tables, spatial, stringAlgorithm design & analysisSorting, graph algorithmsApplications3Why study data structures?Example problemGiven: a set of N numbersGoal: search for number kSolutionStore numbers in an array of size NLinearly scan array until k is found or array is exhaustedNumber of checksBest case: 1Worst case: NAverage case: N/27 16 10 43834Why study data structures?Solution #2Store numbers in a binary search treeSearch tree until find kNumber of checksBest case: 1 Worst case: log2NAverage case: (log2N)/273 101 6 8 435AnalysisDoes it matter?N vs. log2NN vs. Log N0204060801001201 2 3 4 5 6 7 8 9 10Nlinear (N)Logarithmic (log N)6AnalysisDoes it matter?AssumeN = 1,000,000,0001 billion (Walmart transactions in 100 days)1 GHz processor = 109cycles per second1 cycle per transactionO(N) algorithm1 billion transactions = > 1 billion clock cyclesO(lg N) algorithm1 billion transactions => 30 clock cycles7Example 2Scheduling job in a printerWrite a code to manage the printer queueFunctions to supportInsert, deleteSpecial accommodations needed for:PriorityDynamic updateScheduling challenges8Example 3Exploring the Facebook connection networkWrite a code to tell who is connected to who (directly or indirectly) through your Facebook profile6-degrees of separation9Example 4Pattern matchingWrite a code to do Google search on your web database10SummaryKeep the data organizedAppropriate data structures ease design & improve performanceChallengeDesign appropriate data structure & associated algorithms for a problemAnalyze to show improved


View Full Document

WSU CPTS 223 - Advanced Data Structures

Download Advanced Data Structures
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Advanced Data Structures and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Advanced Data Structures 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?