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

  • SEARCH
  • Home
  • 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 6003609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:08:45+00:00 2026-05-23T01:08:45+00:00

I will be appearing for Google onsite interview in a week time.I understand that

  • 0

I will be appearing for Google onsite interview in a week time.I understand that hash tables,hash maps,hash functions are very useful and come handy in many interview questions like dictionary,bucket sort,to check duplicacy of one whole document, duplicacy of a URL etc , be it on strings or be it on integers. I am wondering what are some of the popular hash functions both on integers and strings.

One I can think of is h(n)=n for integers, where say we want to rank students depending on their marks i.e. very limited possible values range.

Please help with more popular choices esp for strings,documents.

Thanks,

  • 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-23T01:08:46+00:00Added an answer on May 23, 2026 at 1:08 am

    For strings, one may use the string’s cryptographic hash as the key for a hash table. This will usually lead to a uniform distribution of the hash keys, which is a good hash table property.

    If you want to narrow the size of the key (for example only 32 bit), you can still select a cryptographic hash function such as SHA-256 and use the lower 32 bits.

    One can also represent a number as a string or as binary data and calculate its cryptographic hash to ensure a uniform key distribution.

    Once your keys are uniformally distributed, you don’t need to use a complex hash function- you can just map the key range into equally-sized bins.

    To prepare yourself better for the interview, you may want to read this as well.

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

Sidebar

Related Questions

Will everything go to the cloud? If so, in which direction? Google-Gears? Flash,AIR,JavaFX? See
What windows C IDE can I use that will use gcc to compile and
I make a distributed embedded application that will make use of several micro-controllers. The
I want to use a temp directory that will be unique to this build.
I have seen that most people will do it with this solution that on
I'm working on a .NET application in C# that will generate a variable-length string
I am trying to develop a simple CATransition that shows an UIView appearing from
I have a game application that I will be running in a web browser
I have a TextArea component called labels that will be populated by Strings in
I'm writing an iPhone app (which will be my first ios app) that has

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.