Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

For complicated keys it can be expensive to calculate a good hash code. There ar

ID: 3864416 • Letter: F

Question

For complicated keys it can be expensive to calculate a good hash code. There are different ways to respond to such a situation. Only two of the options below should be considered. Which are these two (2) options? Come to the conclusion that calculating the hash code won't affect the overall performance even for complex calculations Store the hash code so it has to be calculated only once Consider using left-leaning red-black BSTs for your symbol table implementation Simplify the hash code even if it means that the keys are no longer uniformly distributed The performance of hash tables is based on the uniform hashing assumption. This can cause issues in a number of situations. Below you find 2 examples where the hash function can cause a problem. Check both of these two (2) examples? If a left-leaning red-black binary search tree is used If the hash code function is known and exploited to create a denial-of-service attack If a guaranteed performance is required (e.

Explanation / Answer

1)

a. store the hash code it has be calculate only once

b.simplify the hash code even if it means that the keys are no longer uniformly distributed

2)

a.if the hash codde function isn known and exploited to create a denial of service attack

b. if a guaranteed performance is required

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote