Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7085499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:25:55+00:00 2026-05-28T07:25:55+00:00

Can some one explain Given a hash table array of size N=11., and using

  • 0

Can some one explain

Given a hash table array of size N=11., and using a hash function –
h(x) = 3 x + 7 mod N

Together with linear probing, the following sequence of operations are
performed:

insert 5, insert 15, insert 4, insert 8, insert 7, insert 12

What is the final state of the hash table?


By my logic

h(5) = (3*5) + (7 mod 11) = 15 + 7 = 22 so place in table[0]
h(15) = (3*15) + (7 mod 11) = 45 + 7 = 52 so place in array[0]..cant so put in table[1]

etc.

But apparently my method is wrong. – e.g. h(15) places 15 in table[8]

What have I failed to account for?

EDIT:

Forgot to mod 11 the answer! Simple mistake.
h(5) = ((3*5) + 7) mod 11 = 15 + 7 = 22 -> 22 mod 11 = 0 so place in table[0]
h(15) = ((3*15) + 7) mod 11 = 45 + 7 = 52 -> 52 mod 11 = 8 so place in array[8]

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:25:56+00:00Added an answer on May 28, 2026 at 7:25 am

    I think your hash function should be (3x+7) mod N, not 3x + (7 mod N).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can some one explain to me the difference between categories and inheritance in Objective
How to pass parameters to [WebMethod] in Asp.Net(C#) ? Can some one please explain
Can someone explain the mechanics of a jump table and why is would be
Can someone explain to me the advantages of using an IOC container over simply
Can someone explain what are the benefits of using the @import syntax comparing to
Given a table of models 'A', that can have multiple child models 'B', of
Can someone please explain how static variables in member functions work in C++. Given
Can someone explain the reason/importance of why javascriptlint (not jslint) gives the warning inc_dec_within_stmt
Can someone give me an essential Wordpress Loop and explain to me what's happening
Can someone explain this result to me. The first test succeeds but the second

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.