Hash Tables

Hash Tables PowerPoint PPT Presentation


  • 129 Views
  • Uploaded on
  • Presentation posted in: General

8th May 2007. Linked Listinsert, find, delete operations take O(n)Stack

Download Presentation

Hash Tables

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


1. 8th May 2007 Hash Tables

2. 8th May 2007 Linked List insert, find, delete operations take O(n) Stack & Queue insert, find, delete operations take O(1) but the access is restricted Binary Search Tree insert, find, delete operations take O(log n) in average case, but take O(n) in worst case AVL Tree, Red-Black Tree insert, find, delete operations take O(log n) Review

3. 8th May 2007 Review Array all operations take O(1) time data accessed using index (integer) size should be determined first not growable

4. 8th May 2007 Hashing Definition Hash function Collision resolution Open hashing Separate chaining Closed hashing (Open addressing) Linear probing Quadratic probing Double hashing Primary Clustering, Secondary Clustering Access: insert, find, delete Outline

5. 8th May 2007 Hash Tables Hashing is used for storing relatively large amounts of data in a table called a hash table ADT. Hash table is usually fixed as H-size, which is larger than the amount of data that we want to store. We define the load factor (?) to be the ratio of data to the size of the hash table. Hash function maps an item into an index in range.

  • Login