Chapter 8: Problem 32
Give at least two examples of situations in which hashing is not appropriate.
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 8: Problem 32
Give at least two examples of situations in which hashing is not appropriate.
All the tools & learning materials you need for study success - in one app.
Get started for free
Let \(S\) and \(T\) be two arrays of \(n\) numbers that are already in nondecreasing order. Write an algorithm that finds the median of all \(2 n\) numbers whose time complexity is in \(\Theta(\lg n)\)
Write a probabilistic algorithm that factorizes any integer using the functions prime and factor. Function prime is a boolean function that returns "true" if a given integer is a prime number and returns "false" if it is not. Function factor is a function that returns a nontrivial factor of a given composite integer. Analyze your algorithm, and show the results using order notation.
Theorem 8.3 states that, for a successful search, the average search time over all inputs containing \(n\) keys, using binary search trees, is in \(\Theta(\lg n)\). Show that this result still holds if we consider an unsuccessful search as well.
Write an algorithm that finds the largest key in a binary search tree. Analyze your algorithm, and show the results using order notation.
Write an algorithm that creates a \(3-2\) tree from a list of keys. Analyze your algorithm, and show the results using order notation.
What do you think about this solution?
We value your feedback to improve our textbook solutions.