hashing help

This is a discussion on hashing help within the C Programming forums, part of the General Programming Boards category; Originally posted by Hammer Technically not correct, imho. It will store a binary representation of a decimal 1 in an ...

  1. #16
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by Hammer
    Technically not correct, imho. It will store a binary representation of a decimal 1 in an int variable, which will require lots of preceding binary 0's to pad the int. Therefore, we are storing is as 0000000....1 And how many digits is that?!

    Anyway, pointless argument really We're both right, in our own way.
    Yeah I thought of that after I typed it. Unless you're on a "big endian" system, in which case it'd be something horrible like:

    1000000000000000

    Or, no, it's something screwed up because of the way it flops the byte ordering, something like:

    00001000000000000

    I don't recall off the top of my head, but it's ugly anyway.

    Quzah.
    Last edited by quzah; 10-28-2002 at 06:18 PM.
    Hope is the first step on the road to disappointment.

  2. #17
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    You guys don't take jokes or sarcasism to well
    Since the code is supposivly wrong how is anyone
    supposed to know what clashes mean. For example
    the code could be to count the number of probes. This would
    make more sence the running time of each search is based
    on the number of probes.
    It's common to say that's a six digit number. By that
    I'm saying it takes at most six digits to store it.

  3. #18
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    It's little endian system that's horrible. It stores the least
    signficant byte first. You might have to define if your
    storing 1 in a int, double, or char.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating Linked List Using Hashing and Stack
    By m0ntana in forum C Programming
    Replies: 2
    Last Post: 04-07-2007, 08:11 AM
  2. Hashing, indexing and phonetic normalization for approximate str matching...
    By biterman in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 11-21-2006, 09:42 AM
  3. Replies: 8
    Last Post: 09-11-2006, 12:26 PM
  4. Doubt about Hashing
    By louis_mine in forum C Programming
    Replies: 1
    Last Post: 11-11-2005, 12:00 AM
  5. Double Hashing
    By carrja99 in forum C++ Programming
    Replies: 1
    Last Post: 03-28-2003, 08:36 AM

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