25a-hashing - CSE143 Lecture25 Hashing read11.2...

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

View Full Document Right Arrow Icon
CSE 143 Lecture 25 Hashing read 11.2 slides created by Marty Stepp http://www.cs.washington.edu/143/
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 Recall: ADTs  (11.1) abstract data type (ADT) : A specification of a collection of  data and the operations that can be performed on it. Describes  what  a collection does, not  how  it does it. Java's collection framework describes ADTs with interfaces: Collection Deque List Map Queue Set SortedMap An ADT can be implemented in multiple ways by classes: ArrayList  and  LinkedList implement  List HashSet  and  TreeSet implement  Set LinkedList  ,  ArrayDeque , etc. implement  Queue
Background image of page 2
3 SearchTree  as a set We implemented a class  SearchTree  to store a BST of  int s: Our BST is essentially a set of integers. Operations we support: add contains remove ... But there are other ways to implement a set. .. 91 60 87 29 55 42 -3 overallRoot
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 How to implement a set? Elements of a  TreeSet  ( IntTree ) are in BST sorted order. We need this in order to add or search in O(log  ) time. But it doesn't really matter what order the elements appear in a  set, so long as they can be added and searched quickly. Consider the task of storing a set in an array.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 15

25a-hashing - CSE143 Lecture25 Hashing read11.2...

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

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