{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Midterm Review2.7

Midterm Review2.7 - Dictionaries& Ordered Search Tables...

Info iconThis preview shows pages 1–2. 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 Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Dictionaries & Ordered Search Tables If keys obey a total order relation, can represent dictionary as an ordered search table stored in an array. Can then support a fast find(k) using binary search. at each step, the number of candidate items is halved terminates after a logarithmic number of steps Example: find(7) 0 1 3 4 5 7 8 1 3 4 5 m l 0 1 1 CSE 2011 Prof. J. Elder 3 7 14 16 18 3 19 h 8 9 11 14 16 18 19 8 9 11 14 16 18 19 8 9 11 14 16 18 19 h 4 5 7 l 0 11 m l 0 9 m h 4 5 7 l=m =h - 81 - Last Updated: 1/7/10 10:14 AM CSE 2011 Prof. J. Elder - 82 - Last Updated: 1/7/10 10:14 AM ...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

Midterm Review2.7 - Dictionaries& Ordered Search Tables...

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

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