Data Str & Algorithm HW Solutions 62

Data Str & Algorithm HW Solutions 62 - 62 Chap. 9...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
62 Chap. 9 Searching (c) 37 9.16 Key:2831201 91 85 32 7 H1:28576511 H2:39112315 Result of inserting: 2 2OK 8 8OK 31 5OK 20 7OK 19 6OK 18 5 Collision. So, try 5+3 = 8. Collision. Then 5+6 = 11. OK 53 1OK 27 1 Collision. So, try 1+5 = 6. Collision. Then 1+5+5 = 11. Collision. Then 1+5+5+5 % 13 = 3. OK Final table: Position: 0123456789 1 01 11 2 Value: 53 2 27 31 19 20 8 18 9.17 // Search for and delete the record with Key K template <class Key, class Elem, class KEComp, class EEComp> bool hashdict<Key, Elem, KEComp, EEComp>::
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/27/2011 for the course MAP 2302 taught by Professor Bell,d during the Fall '08 term at UNF.

Ask a homework question - tutors are online