Wednesday, 20 April 2016
Week 12
This week we looked at hash tables. From what I understand, hashing is when you utilize an algorithm to store an element in memory as to access it in an efficient way later. It makes a map to the value you are looking for. It reduces the worst case of searching for a value from linear to constant. That is it is independent of the number of items in the array. The algorithms assigns a key value to each value in order to access it later. It runs into trouble if two values are assigned the same key values. This is called a collision. To avoid collisions the algorithm attempts to spread out the key value.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment