Skip to main content
ICT
Lesson AB32 - Hash-Coded Data Storage
 
Main Previous Next
Title Page >  
Summary >  
Lesson A1 >  
Lesson A2 >  
Lesson A3 >  
Lesson A4 >  
Lesson A5 >  
Lesson A6 >  
Lesson A7 >  
Lesson A8 >  
Lesson A9 >  
Lesson A10 >  
Lesson A11 >  
Lesson A12 >  
Lesson A13 >  
Lesson A14 >  
Lesson A15 >  
Lesson A16 >  
Lesson A17 >  
Lesson A18 >  
Lesson A19 >  
Lesson A20 >  
Lesson A21 >  
Lesson A22 >  
Lesson AB23 >  
Lesson AB24 >  
Lesson AB25 >  
Lesson AB26 >  
Lesson AB27 >  
Lesson AB28 >  
Lesson AB29 >  
Lesson AB30 >  
Lesson AB31 >  
Lesson AB32 >  
Lesson AB33 >  
Vocabulary >  
 

AB32 Introduction page 1 of 8

In the labs in previous lessons, you have searched a data file containing ID and inventory information in a variety of ways. Of the search algorithms studied, the fastest search algorithm was O(log2N) for a binary tree or binary search of an ordered array. It is possible to improve on these algorithms, reducing the order of searching to O(1). The data structure used to accomplish this is called a hash table, and the O(1) search is referred to as hashing.

An example of hashing frequently occurs in schools, when students line up into 26 lines, each line representing the first letter of their last name. Another example occurs when one large group or list of student schedules is broken down into smaller groupings or lists, often by grade level, for easier distribution. This is what hash-coded data storage is about - breaking up and reorganizing one big list into many smaller lists.

The key topics for this lesson are:

  1. Hashing Schemes
  2. Dealing with Collisions
  3. Order of a Hash-Coded Data Search
  4. HashSet and HashMap
Main Previous Next
Contact
 © ICT 2006, All Rights Reserved.