CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Hashing Quest

  1. #1
    Join Date
    Dec 2004
    Posts
    7

    Question Hashing Quest

    Suppose you want to use hashing with linear probing on a table of size m, and have n keys to place in it, with n<m. In terms of m, what is the largest n can be and still guarentee O(1) average case performance when searching for a key?

    a. (3 * m)/4
    b. m/2
    c. m/4
    d. squareRoot(m)

  2. #2
    Join Date
    Mar 2002
    Location
    St. Petersburg, Florida, USA
    Posts
    12,125

    Re: Hashing Quest

    Soulds suspicously like a homework/exam question.....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009,2010
    In theory, there is no difference between theory and practice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  3. #3
    Join Date
    Dec 2004
    Posts
    7

    Re: Hashing Quest

    you must be a rocket scientist, b/c no one could have figured that one out. impressive.
    Last edited by bdadbin; December 7th, 2004 at 03:54 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured