Question: Short Answers 1. Here is an array with exactly 15 clements: Short Answers Section 12.1 Serial Search and Binary Search 1 23 5 6 78

 Short Answers 1. Here is an array with exactly 15 clements:Short Answers Section 12.1 Serial Search and Binary Search 1 23 56 78 9 10 11 12 13 1 15 Suppose that weare doing a serial search for an element. Circle any elements that

Short Answers 1. Here is an array with exactly 15 clements: Short Answers Section 12.1 Serial Search and Binary Search 1 23 5 6 78 9 10 11 12 13 1 15 Suppose that we are doing a serial search for an element. Circle any elements that will be found by examining two or fewer numbers from the array 2. Here is an array with exactly 15 elements: 1 23 4 5 6 7 9 10 11 1 13 14 15 Suppose that we are doing a binary search for an element. Circle any elements that will be found by examining two or fewer numbers from the array 3. Implement the body of the following function using a binary search of the array. You do not need to check the precondition. All your local variables must be size t variables bool haa42const int data[ ], size-t n) // Precondition: The elements data [ data [n-1] are sorted from smallesst to largest. The value of n might be zero (indicating an enpty array) Postcondition: A true return value indicates that the number 42 appears in data[0]. .data n-1. A false return value indicates that 42 doesn't appear 4. Draw a hash table with open addressing and a size of 9, Use the hash function "k%9". Insert the keys: 5, 29, 20, 0, 27 and 18 into your table (in that order). Short Answers Section 12.2 Open-Address Hashing 5. Suppose you are building an open address hash table with double hashing. The hash table capacity is n, so that the valid hash table indexes range from 0 to n. Fill in the blanks: o In order to ensure that every array position is examined, the value returned by the second hash function must be o One way to ensure this good behavior is to make n beand have the return value of the second hash function range from with respect to n. to (including the end points) 6. You are writing code for the remove member function of a chained hash table. Fill in the blanks in this pseudocode with the two missing statements. You may use pseudocode yourself, or write actual Short Answers C++ code: Section 12.3 Chained Hashin void Table: irenove(int key) Node curBor sizc t i; 1. i = hash(key); 2 Make cursor point to the node that contains an item with the given key (or set it to NULL if there is no such node). 3. if (cursor -NULL) 3a 3b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!