) What are the best, worst, and average case runtimes for finding the smallest element in an unsorted array? Explain. (b) If you know that a binary tree is full, compare the complexity of finding the number of elements in the binary tree with finding the number of elements in a perfect binary tree. Explain. (c) Hash tables are normally very efficient - often O(1) with a good hash function. However, hash tables are not always the best choice. When would it be better to choose a different data representation? Explain. (d) In what cases would an array representation of a binary tree be more efficient than a node representation? Explain.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter18: Deterministic Dynamic Programming
Section18.4: Resource-allocation Problems
Problem 3P
icon
Related questions
Question

(a) What are the best, worst, and average case runtimes for finding the smallest element in
an unsorted array? Explain.
(b) If you know that a binary tree is full, compare the complexity of finding the number of elements in the binary tree with finding the number of elements in a perfect binary
tree. Explain.
(c) Hash tables are normally very efficient - often O(1) with a good hash function. However,
hash tables are not always the best choice. When would it be better to choose a different
data representation? Explain.
(d) In what cases would an array representation of a binary tree be more efficient than
a node representation? Explain.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Types of trees
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole