Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Java Programming
Quiz 14: Searching and Sorting
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
True/False
Suppose that you have the following list. int[] list = {1, 3, 5, 7, 9, 11, 13, 15, 17}; Further assume that binary search is used to determine whether 8 is in list. When the loop terminates, the value of the index variable first is 1.
Question 22
Multiple Choice
-What is the minimum number of comparisons that have to be made to find 18 using a sequential search on the list shown in the accompanying figure?
Question 23
Multiple Choice
-In a sequential search, how many key comparisons would have to be made on the list in the accompanying figure to find the number 5?
Question 24
Multiple Choice
Consider the following list. list = {20, 10, 17, 2, 18, 35, 30, 90, 48, 47}; Suppose that sequential search as discussed in the book is used to determine whether 2 is in list. Exactly how many key comparisons are executed by the sequential search algorithm?
Question 25
True/False
Suppose that you have the following list. int[] list = {5, 10, 15, 20, 25, 30, 35, 40, 45}; Further assume that binary search is used to determine whether 20 is in list. When the loop terminates, the value of the index variable first is 3.