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 9169047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:46:39+00:00 2026-06-17T15:46:39+00:00

I just read an interview question that asked for the fetching complexity of a

  • 0

I just read an interview question that asked for the fetching complexity of a hash key vs a hash value. I always figured both to be the same, at O(1 + n/k) (where k is number of buckets). What am I missing?

  • 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-06-17T15:46:41+00:00Added an answer on June 17, 2026 at 3:46 pm

    Fetching a hash key is O(lk) in the length of the key, because you have to hash it, but n/k is supposed to be constant for any given hash table. This is usually referred to as O(1) as it does not depend on n, but it’s not strictly O(1) unless the key size is fixed.

    But fetching a hash value would require iterating through the whole table looking for it, assuming you didn’t pre-order it (you can design hash tables which can support binary lookups too for O(log(n)) but this is uncommon).

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

Sidebar

Related Questions

I just read this question , and a solution states that: The fact that
I just read this article from Google. I always thought that closing tags is
I just read an article on www.songho.ca which indicates that a projection matrix is
I just read in Code Complete that you should not use exceptions for flow
I just read a blog which says ...methods that couldn’t be inlined previously because
In a recent interview, I was asked a really strange question. The interviewer asked
As an exercise (read:interview question) in index optimisation, I need a query which is
Just read some posts about how wonderful Silverlight 3.0 is, including that it uses
I just read this question and the accepted answer: What is JavaScript garbage collection?
I just read this post about really nasty (and cool at the same time)

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.