Question

Please use Java, thank you!

5.

Hashing

1) Insert the keys E X A M Q U S T I O N in that order into an initially empty table of M = 5 lists, using separate chaining. Use the hash function 11 k %

M to transform the kth letter of the alphabet into a table index. Show the hash table after each insertion.

hown in the following table Use A-1, B 2,. as 20 21 22 23 24 25 26 1 2 345 7910 1112 13 14 15 1617 1 19 2 26

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

EXAMQUSTION

  • insert "E"

index = 11 * k % M = 11 * 5 % 5 = 55 % 5 = 0

index = 0

01234

  • insert "X"

index = 11 * k % M = 11 * 24 % 5 = 264 % 5 = 4

index = 4

  • insert "A"

index = 11 * k % M = 11 * 1 % 5 = 11 % 5 = 1

index = 1

0 소 2-34

  • insert "M"

index = 11 * k % M = 11 * 13 % 5 = 143 % 5 = 3

index = 3

o 2-34

  • insert "Q"

    index = 11 * k % M = 11 * 17 % 5 = 187 % 5 = 2

    index = 2

  • insert "U"

    index = 11 * k % M = 11 * 21 % 5 = 231 % 5 = 1

    index = 1

    0 o 2-34
  • insert "S"

    index = 11 * k % M = 11 * 19 % 5 = 209 % 5 = 4

    index = 4

    ㅇ 소 2-34
  • insert "T"

    index = 11 * k % M = 11 * 20 % 5 = 220 % 5 = 0

    index = 0

    o 2-34
  • insert "I"

    index = 11 * k % M = 11 * 9 % 5 = 99 % 5 = 4

    index = 4

    키| 04 234
  • insert "O"

    index = 11 * k % M = 11 * 15 % 5 = 165 % 5 = 0

    index = 0

    3 M
  • insert "N"

    index = 11 * k % M = 11 * 14 % 5 = 145 % 5 = 4

    index = 4

    3 M
Add a comment
Know the answer?
Add Answer to:
Please use Java, thank you! 5. Hashing 1) Insert the keys E X A M Q U S T I O N in that order into an initially empty ta...
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
  • 느 - K L M N O Р Q R S B с D E F...

    느 - K L M N O Р Q R S B с D E F G H 4 A sample of households provided the following information about their Per Capita Income. 5 Use Excel to construct a percent frequency distribution table and graph. 6 Provide an appropriate label for each of the horizontal and vertical axes. 7 Make your first class "30,000-34,999" 8 Place the frequency distribution table and histogram within the highlighted box below. 9 Per Capita 10...

  • 1 Objective Build a hashing algorithm that is suitable for use in a Bloom Filter. Please...

    1 Objective Build a hashing algorithm that is suitable for use in a Bloom Filter. Please note that while a cryptographic hash is quite common in many Bloom Filters, the hashing algorithm to be implemented is a mix of the the following algorithmic models, specifically, a multiply & rotate hash colloquially known as a murmur hash, and an AND, rolale, & XOR hash colloquially known as an ARX hash. 2 Requirements • Inputs. Read the input file which contains strings...

  • Please show work on excel with equations. Thank you 16 #5 Expected 17 Stock 18 Correlation...

    Please show work on excel with equations. Thank you 16 #5 Expected 17 Stock 18 Correlation with Standard Correlation with Correlation with Duke Energy Return Deviation Microsoft Wal-Mart 19 Duke Energy 14% 6% -1 20 Microsoft 44% 24% -1 0.7 21 Wal-Mart 23% 14% 0.7 22 23 (a) Usin above table, calculate the volatility of a portfolio that is equally invested in Duke Energy and Microsoft. 24 (b) Usin above table, calculate the volatility of a portfolio that is equally...

  • 1. You are the new data scientist for Fitbit. When viewing the Google Analytics account associate...

    1. You are the new data scientist for Fitbit. When viewing the Google Analytics account associated with the Fitbit website., you notice that the Average Time on Site is 82 seconds. - Describe 4 different ways you can provide context for this metric. - For the sub-activity, refer to the attachment below entitled, "Image_Module_11.jpg" (the image is also embedded within the text below). Imagine that you have created an email campaign designed to drive users to your site. The email...

  • A B D E F. G н I к L M м. N o P Q...

    A B D E F. G н I к L M м. N o P Q R S T U V Adjustments Debit Credit Adjusted Trial Balance Debit Credit Closing Entries Debit Credit Post Closing Trial Balance Debit Credit 1 Trial Balance Item 2 Account Title Debit Credit 3 Cash 20,000.00 4 Supplies 5,000.00 5 Prepaid Rent 12,000.00 6 Equipment 200,000.00 7 Accumulated Depreciation 120,000.00 8 Accounts Payable 8,000.00 9 Unearned Revenue 10,000.00 10 Common Stock 20,000.00 11 Retained Earnings...

  • s. QUESTION 2 Use minitab Suppose a sample of 20 students were given a diagnostic test...

    s. QUESTION 2 Use minitab Suppose a sample of 20 students were given a diagnostic test before studying a particular module and then again after completing the module. We want to find out if, in general, our teaching leads to improvements in students' knowledge/skills (i.e. test scores). We can use the results from our sample of students to draw conclusions about the impact of this module in general. 92.MPJ 1) check assumption (fort show your correct 3) find the t-value...

  • i need help with #6, #15, and # 17. please and thank you! 1 lim 8...

    i need help with #6, #15, and # 17. please and thank you! 1 lim 8 lim- 22 2 lim Problems for $1.3 For problems 1 through 14: By replacing functions with a few terms of their asymptotic series, find the following limits. et - 26 +1 tan(x) – sin(x) cosh(x) 20 cos(2) - 11 - 22 9 lim sin(x) sin (x) – 2,2 1-0 24 *+0 tan(x) tan-(x) - 22 3 lim x2 + x -2 10 lim x1...

  • please complete in excel. Thank you. K16 D F M N O P o A B...

    please complete in excel. Thank you. K16 D F M N O P o A B 1 Formula: Multiply, Divide, Subtract; Cell Referencing 2 3 BE12.9. Using Excel to Calculate the carrying Value of a Patent 4 PROBLEM 5 Nieland Industries had one patent recorded on its books as of January 6 1.2020. Additional information concerning this patent follows. 7 8 Book value, January 1, 2020 $ 288,000 Remaining useful life 8 years Student Work Area -BE12.9 Required: Provide input...

  • Once you have the dataset, please use knowledge gained in other business and/or economics classes to...

    Once you have the dataset, please use knowledge gained in other business and/or economics classes to realize what topic and theory the data could relate and a research question that it could allow you to answer. More specifically, please put together an analysis by making sure your project report includes the following 1. Make a decision about the null and research hypothesis by comparing the obtained value to the critical value and interpret the results of the data. You can...

  • Please write in the answer clear. Will leave like if its correct . Age Gen Sibs Work Exercise Units Mom 18 M 1 20 10 15 6 17 F 3 0 7 15 14 23 M...

    Please write in the answer clear. Will leave like if its correct . Age Gen Sibs Work Exercise Units Mom 18 M 1 20 10 15 6 17 F 3 0 7 15 14 23 M 3 20 5 13 8 20 M 2 0 5 15 16 18 F 4 22 6 16 9 20 F 2 11 7 20 20 34 F 1 48 10 10 18 22 F 3 37 13 13 18 19 M 3 0...

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
ADVERTISEMENT