tutorial04

# tutorial04 - CSC2100B 2007 Spring Data Structures Tutorial...

This preview shows pages 1–8. Sign up to view the full content.

07:02 07:02   1 CSC2100B 2007 Spring Data Structures Tutorial 4 Last updated: 6 Feb, 2007

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

View Full Document
07:02 07:02   2 Exercise 3A Hashing Which of the  following collision  resolution schemes  are  open addressing  hashing  schemes?  (i.e, all elements are  stored in the table  itself?) Scheme Is it an  open addressing hashing   scheme?  Put a ‘√’ under either  YES or NO. YES NO Separate  Chaining Linear Probing Quadratic  Probing Double  Hashing
07:02 07:02   3 Answer 3A Hashing Which of the  following collision  resolution schemes  are  open addressing  hashing  schemes?  (i.e, all elements are  stored in the table  itself?) Scheme Is it an  open addressing hashing   scheme?  Put a ‘√’ under either  YES or NO. YES NO Separate  Chaining Linear Probing Quadratic  Probing Double  Hashing

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

View Full Document
07:02 07:02   4 Review Separate chaining - chain them up…
07:02 07:02   5 Review Open Addressing Hashing

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

View Full Document
07:02 07:02   6 Exercise 3B Hashing Given input { 427 132 617 419 434 967 198 254 821 } and a hash function h(x) = x mod  10 , show the  resulting hash tables using: Separate chaining Linear Probing, with probing function F( i )= (i.e, h i ( x )= h( x ) +  i ) Quadratic Probing, with probing function F( i )= i 2   (i.e, h i ( x )= h( x ) +  i 2 ) Ref: 1998a3
07:02 07:02   7 Answer3B - Chaining { 427 ,   132 617 419 434 967 198 254 821 } h(x) = x mod  10 value 0 1 2 3 4 5 6 7 8 9

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 27

tutorial04 - CSC2100B 2007 Spring Data Structures Tutorial...

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

View Full Document
Ask a homework question - tutors are online