Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Which type of search (linear, binary, or hash) is the best choice for the following scenarios? Explain why you would choose that type of search,

Which type of search (linear, binary, or hash) is the best choice for the following scenarios? Explain why you would choose that type of search, ensuring that you illustrate what characteristics in the scenario limit and/or support the type of search you can perform [2 marks each]. Assume that you cannot rearrange any of the data in any way. Submit your answers as a .pdf file.

a. You need to find the phone number for a specific person on your contacts list, which is organized alphabetically by name.

b. You want to the first item on your shopping list (e.g. a pair of shoes), in a department store that is organized by department (e.g. food, housewares, clothes, electronics, etc).

c. You want to find the longest word in the dictionary.

d. You are looking at a departures list in an airport (which is sorted by the destination city), and you want to find your flight to Ottawa in the list.

e. You have a record of visits to your website, organized by visit time. You want to find when a specific person last visited your website, and are given only the person's name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions

Question

Refer to Example 10.18 and find a 90% confidence interval for /0.

Answered: 1 week ago