lec14-15 - Click to edit Master subtitle style 2/7/11...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Click to edit Master subtitle style 2/7/11 Sundar B. CS C341 / I S C361 Data Structures & Algorithms Dictionary Data Structures Search Trees Comparison of Sorted Arrays and Hashtables Ordered Dictionaries- Better Representation- Binary Trees- Binary Search Trees- Implementation (Find, Add, and Delete)- Efficiency 11 2/7/11 Sundar B. 2/7/11 Sundar B. Dictionary Implementations - Comparison 2/7/11 Sundar B. 22 Suitable for: Suitable for: Sorted Array Hashtable 2/7/11 Sundar B. Dictionary implementations - Comparison 2/7/11 Sundar B. 33 Time Complexity (find): Time Complexity (find): Sorted Array Hashtable 2/7/11 Sundar B. Ordered Dictionary Better Representation? Is there an representation that supports relative order queries and supports online operations and is resizable ? Revisit (the general structure of) Quicksort(Ls) Quicksort(Ls) { If (|Ls|>0) { Partition Ls based on a pivot into LL and LG QuickSort LL 2/7/11 44 Sundar B. 2/7/11 Sundar B. Ordered Dictionary Better Representation? 2/7/11 55 Sundar B. { C 5 9 6 9 5 9 -9 7 3-4 B 7 3 -B 8 1 5 -6 1 D 7 9 2 C 5 3 B 5 0 } piv1 piv11 piv111 piv112 { 4 8 5 2 8 4 3 9 -7 A 1 7 -4 9 0-B 8 F 3 -7 5 F D 4 5 0 7 D 7 E F } piv12 piv121 QuickSort Visualized 2/7/11 Sundar B. Ordered Dictionary Better Representation? Can we re-materialize the QuickSort order while searching? i.e. a representation where key is compared with the pivot (pre-selected) key == pivot ==> done key < pivot ==> search in left subset key > pivot ==> search in right subset....
View Full Document

Page1 / 20

lec14-15 - Click to edit Master subtitle style 2/7/11...

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