CSC 111 Lecture Notes - Lecture 17: Linked List, Hash Table, Unique Key

32 views3 pages

Document Summary

On everything from past exam until end of semester. Idea behind hash table is to map data to a unique location in an array. H(7: h(7) : hash table of size 7, conditions, 1. 4 n-1: data: 14, 3, 11, 21, 13, 7, h (x) = x%7; h (7) 13: linear probing, search for next available location starting from hash index. 13 h(x) = 0 h(y) = 0 because x is already 0 y will go to 1 even though it equals 0 because 0 is occupied 21 goes to 1 because 0 and 1 are occupied, 7 goes to. Insert: done, search, separate chaining search linked list. Linear probing search until found of available: will go from its index at h (n) and search following indexes until it is found or it reaches an open spot, delete, separate chaining remove form linked list. Linear probing: put in deactivate symbol, et (cid:862)deactive(cid:863) (cid:373)arker, hash table performance.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents