Why can not a binary search be applied on the given list

Assignment Help Data Structure & Algorithms
Reference no: EM131391113

Question 1. Which of the following is not a search algorithm or technique?
Sequential search
Binary search
Linear search
Recursive search

Question 2. Why can't a binary search be applied on the list below?
17, 22, 31, 19, 39, 43, 16
The list is too small.
The list is not sorted.
The size of the list is not a power of 2.
A binary search can be applied on the list as it appears.

Question 3. When designing a hash function, we try to _____ the number of collisions.
maximize
minimize
double
increment

Question 4. In separate chaining, the keys that map to the same hash value are stored in a _____.
class
vector
array
linked list

Question 5. The hash table allows for insertions, deletions, and searches in _____.
O(n3 )
O(n log n)
average constant time
O(2n)

Question 6. In hashing, when two keys produce the same value of the hash function, we say that we have a key _____.
identification
assignment
collision
comparison

Question 7. Searching for an element based on using a unique key is _____.
slower
faster and more convenient
unusual
inefficient

Question 8. One of the main operations associated with the dictionary ADT is _____.
insert a value as the first item in the dictionary
given a value, insert or add a new entry to the dictionary
given a key and a value, insert or add a new entry to the dictionary
return the hash value of a key

Question 9. Suppose that the first 100,000 odd numbers are stored in a linked list, sorted in increasing order: 1, 3, 5, 7, . . . . Which searching method would you implement? Assume that only one search is to be conducted.
Sequential search
Sorted search
Binary search on an unsorted linked list
Binary search on a sorted linked list

Question 10. The worst-case time efficiency of a sequential search on an array a withn elements is _____.
when the item you are searching is not present in the array
when the item you are searching is the first item, a[0]
when the item you are searching is the second item in the array, a[1]
when the item you are searching is the one in the middle of the array, a[n/2]

Question 11. Given the following array, how many comparisons to an array entry are performed to search for the number 22 if you use the binary search algorithm?

11 13 15 19 22 27 31 39 46
1
2
4
22

Reference no: EM131391113

Questions Cloud

What is its grid location and part number : Its low-order address is multiplexed like the 68HC11 in Problem 17-30. What IC and control signal are used to demultiplex the address/data bus (AD0-AD7) into the low-order address bus (A0-A7)?
Create class account with id balance person and datecreated : Create class Account with id, balance, Person, and dateCreated. Use a static class variable to store the annualInterestRate for all account holders. Provide constructors, setter and getter for the Account class.
Directly causes what form of heart disease : If the muscle tissues of the heart are deprived of oxygen too long, the cells begin to die. This directly causes what form of heart disease?
Define your companys target market : For most non-alcoholic beverages, marketing (as opposed to the actual product itself) is key to success. Cola drinks, for example, are fairly undifferentiated, as are many energy drinks, juices, bottled water, and the like. Companies producing the..
Why can not a binary search be applied on the given list : Why can't a binary search be applied on the list below? In separate chaining, the keys that map to the same hash value are stored in a _____. When designing a hash function, we try to _____ the number of collisions.
Description of data collection and analysis methods : HI6007 Assessment Three - FINAL Research Proposal. Description of the research process. Strengthen and improve initial proposal. Description of data collection and analysis methods. Strengthen and improve initial proposal. Description of expected res..
Investigation of the disease outbreak : Identify and describe the necessary steps to be taken for an investigation of the disease outbreak. For each of the three prevention levels, provide at least two examples of prevention for this disease.
Discuss about the post given below : Questions concerning the caseworker's method for handling ethical issues.Questions concerning the caseworker's plan for staying current in his or her area of expertise and for receiving continuing education.Questions concerning the caseworker's pro..
Muscular control related to diseases : After researching the causes and symptoms of the following diseases: tetanus, Parkinson's disease, and multiple sclerosis, construct a 100-150 word essay, addressing each of the following in a separate paragraph: How are neuron firing and muscular co..

Reviews

Write a Review

 

Data Structure & Algorithms Questions & Answers

  Declare linked list that will hold the elements in the stack

Create a new class named GenericStack that specifies a type variable that provides for generics. Declare a linked list that will hold the elements in the stack. Then, use the linked list to implement the methods listed above.

  Invokes the selection sort algorithm to sort them

The file Numbers.java reads in an array of integers, invokes the selection sort algorithm to sort them, and then prints the sorted array. Save Sorting.java and Numbers.java to your directory.

  Count all strings as occurrences of one operand

count Halstead's ry1 and ry2. Calculate ry and N. Count all strings as occurrences of one operand called ‘‘string.''

  Write an algorithm that includes the three control structure

This project provides you with the opportunity to examine algorithms, identify the inaccuracies in the algorithms, and finally, to modify the algorithms with the correct details. Your next step will be to write an algorithm that includes the three..

  Create algorithm prompt for and receive employee number

Create algorithm which will prompt for and receive the employee number from operator at terminal. Your program is to search array of valid employee numbers to check that employee number is XXXXX,

  Choose a combination of meaningful data structures

Describe a mechanism to access the telephone customer records by telephone #. Assume that we have a huge data in hand, say a million records or so.

  Sort the functions by increasing order of growth

Array A of size n contains all integers form 1 to (n+1) but one! Assuming the array is sorted, propose a (best-running time) algorithm that finds/identifies the missing number, and analyze its worst-case running time in terms of big-O notation

  What is the size of the key in the des

What is the size of the key in the DES(DATA ENCRYPTION STANDARD) algorithm?

  Calculate best and worst-case speedup for centralized scheme

Suppose that it doesn't take any time to allot work to process, calculate best- and worst-case speedup for centralized scheme for dynamic mapping with two processes.

  Write an algorithm for testing primality

Write an algorithm for testing primality, i.e. given n, the algorithm must decide if n is a prime

  What numbers are compared to 72 if a sequential search is

question 1. what numbers are compared to 72 if a sequential search is used 2 5 7 9 11 17 18 21 28 30 45 5465 69 72.

  Give the adjacency matrix representation of the graph

Give the adjacency matrix representation of the graph in Figure. Find the shortest path between node A and all other nodes in the graph in Figure. Find the minimum spanning tree of the graph in Figure.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd