Top Banner

Click here to load reader

of 357

CSE 373: Data Structures and Algorithms Lecture 16: Hashing III 1.

Jan 19, 2018

Download

Documents

Lorena Dixon

lazy removal: instead of actually removing elements, replace them with a special REMOVED value – avoids expensive re-shuffling of elements on remove – example: remove 18, search for 57 – lookup algorithm becomes slightly modified what should we do when we hit a slot containing the REMOVED value? – keep going – add algorithm becomes slightly modified what should we do when we hit a slot containing the REMOVED value? – use that slot, replace REMOVED with the new value – add(17) --> slot 8 Removal with probing hash tables 3
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.