Question

sets, dictionaties and hasing questions

1: Explain how hashing can provide constant-time access to a data structure.

2: What causes collisions? Give an example of a collision.

3: How does the linear method for resolving collisions work? Use an example to explain.

4: What causes clustering?

5:

What is the load factor for an array of length 30 with 10 items. O 1 0.3 10 30

6:

0 0
Add a comment Improve this question Transcribed image text
Answer #1

As per HOMEWORKLIB POLICY, I am answering only first 4 questions. In order to get the solution of remaining questions, please upload them again.

1.) Since based on the key-index mapping, you can easily find the location of the value stored.

2.) When two keys have the same result while calculating hash values.

3.) Linear method finds the next empty location to store the data. Consider below example, which will clarify all three points:

consider keys are 45,2,84.

and hash function = key%3, array is of size 3.

So for 45, location will be 0, for 2 location will be 2 and for 84, there will be a collision, so with the help of linear probing, 84 will store at 1.

4.) If hash function is producing near by results for each key, or small of array is too small.

Add a comment
Know the answer?
Add Answer to:
sets, dictionaties and hasing questions 1: Explain how hashing can provide constant-time access to a data...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • questions 1 explain how carers and families can support a person with disability to access opportunities...

    questions 1 explain how carers and families can support a person with disability to access opportunities to establish connections. questions 2 identify two of barriers older buildings may present to a person with disability and two groups of people who may be affected. questions 3 give one example of a strategy a community sporting group could use to ensure they are adopting best practice inclusion principles. questions 4 identify two key elements of capacity building and give one example of...

  • Please answer the following questions on your words: 1.Explain how improving quality can lead to reduce...

    Please answer the following questions on your words: 1.Explain how improving quality can lead to reduce cost? 2.How would you define high quality? 3.In supply chain, what is vertical integration? Give example of backward and forward integration? 4.What is JIT? 5.Does lean production work in service sector? Provide an example? 6.Which are lean techniques work in both manufacturing and service sectors?

  • Questions 1. How to create a comment in python? 2. The way to obtain user input...

    Questions 1. How to create a comment in python? 2. The way to obtain user input from command line 3. List standard mathematical operators in python and explain them 4. List comparison operators in python 5. Explain while loop. Give example 6. Explain for loop. Give example 7. How to create infinite loop? And how to stop it? 8. Explain a built-in function ‘range’ for ‘for’ loop 9. Explain break statement 10. Explain continue statement 11. Explain pass statement 12....

  • Short Answers - Subject - Telecommunication System & Management. 1. How can data communications networks affect...

    Short Answers - Subject - Telecommunication System & Management. 1. How can data communications networks affect businesses? 2.     From your own knowledge or background, discuss and describe three important applications of data communications networks for strategic, competitive advantage in business use. Give examples of three real world firms who have used networks for competitive advantage in the marketplace and discuss why these networks contributed to their expertise or competitive advantage. 3.     How do LANs differ from WANs, and BNs? 4.    ...

  • -------------------------------------------------------------------- 1. How does Java support the concept of encapsulation? -------------------------------------------------------------------- 2. Describe the difference between...

    -------------------------------------------------------------------- 1. How does Java support the concept of encapsulation? -------------------------------------------------------------------- 2. Describe the difference between an object and a class. -------------------------------------------------------------------- 3. What is the difference between the contents of a Java variable of a primitive type and a Java variable of a class type? -------------------------------------------------------------------- 4. (a) How is a 'static' class method different from a regular (non-static) class method? (b) How is a 'static' variable in a class different from a regular (instance) variable in a class?...

  • can someone please explain how they got these answers thanks so much. Multiple Choice Questions 1....

    can someone please explain how they got these answers thanks so much. Multiple Choice Questions 1. CDE leased equipment from HIJ on December 31, 20x11, for a 10-year period (also the useful life of the asset). Equal annual payments under the lease are $30.000 and are due on December 31 of each year. The first payment was made on December 31, 20x11, and the second payment was made on the next due date December 31, 20X12. The present value at...

  • can anybody explain how to do #9 by using the theorem 2.7? i know the vectors...

    can anybody explain how to do #9 by using the theorem 2.7? i know the vectors in those matrices are linearly independent, span, and are bases, but i do not know how to show them with the theorem 2.7 a matrix ever, the the col- ons of B. e rela- In Exercises 6-9, use Theorem 2.7 to determine which of the following sets of vectors are linearly independent, which span, and which are bases. 6. In R2t], bi = 1+t...

  • PPT 9' (Container Terminal Operation Management) 1. How do Seaport Container Terminals differ? 2. List the...

    PPT 9' (Container Terminal Operation Management) 1. How do Seaport Container Terminals differ? 2. List the content of the container terminal structure 3. List the Operation Pillars for container Terminal (CT) Planning. 4. How are Electronic Data Interchange (EDI) systems used in Port management? 5. What are the most important information which is checked and monitored by the Cargo Control? 6. What is COPRAR? 7. What are the two ways COPRAR Message functioning? 8. Describe the loading function. 9. Describe...

  • As a digital retailer,how does alibaba provide value to Chinese consumers ? whit sets of values...

    As a digital retailer,how does alibaba provide value to Chinese consumers ? whit sets of values are unique to the chinese market? Given that alibaba does not own or distribute any of the merchandise exchanged on its sites, describes what factors had to develop for the company to succeed. Analyze Alibaba's business model relative to all the different forms of digital and online marketing covered in this chapter. Can alibaba succeed in countries outside of China? Why or why not?...

  • In this lab, we’ll investigate the 802.11 wireless network protocol. Follow the instructions and answers questions...

    In this lab, we’ll investigate the 802.11 wireless network protocol. Follow the instructions and answers questions 7 - 10. http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip In this lab, we'll investigate the 802.11 wireless network protocol. Before beginning this lab, you might want to re-read Section 6.3 in the text. Since we l1 be delving a bit deeper into 802.11 than is covered in the text, you might want to check out "A Technical Tutorial on the 802.11Protocol," by Pablo Brenner (Breezecom Communications) http://www.sss-mag.com/pdf802_11tut.pdf, and "Understanding...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT