Hash tables - chaining

This is a discussion on Hash tables - chaining within the C Programming forums, part of the General Programming Boards category; Does anybody know of a Hash Chaining algorithm or a web page for it? I am trying to implement a ...

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    19

    Hash tables - chaining

    Does anybody know of a Hash Chaining algorithm or a web page for it?

    I am trying to implement a hash table with searching and insertion.

    Many thanks

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,418
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User MacNilly's Avatar
    Join Date
    Oct 2005
    Posts
    307
    Here's one.

    First of all, each element of the hash array is actually a linked list. If hasharray[index] != EmptyList, then call List_add (or inser or whatever) to that list. When searching, just do a search on the list if it's not null, if it is then the search return false.
    GCC on Fedora Core 10

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Iterable hash tables
    By OnionKnight in forum Tech Board
    Replies: 5
    Last Post: 07-21-2008, 02:02 AM
  2. need help with hash tables with direct chaining
    By agentsmith in forum C Programming
    Replies: 4
    Last Post: 01-05-2008, 03:19 AM
  3. Group Project Help/Volunteer
    By DarkDot in forum C++ Programming
    Replies: 3
    Last Post: 04-24-2007, 11:36 PM
  4. Chaining Hash Tables (in C)
    By sql.scripter in forum C Programming
    Replies: 18
    Last Post: 09-25-2006, 01:05 AM
  5. Help with beginning hash tables, please.
    By Will in forum C++ Programming
    Replies: 8
    Last Post: 11-17-2002, 08:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21