Services
Discover
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
Exam 14: Searching and Sorting
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 21
True/False
A binary search can be performed on both sorted and unsorted lists.
Question 22
Multiple Choice
Consider the following list. list = {24, 20, 10, 75, 70, 18, 60, 35} Suppose that list is sorted using the insertion sort algorithm as discussed in the book. What is the resulting list after two passes of the sorting phase; that is, after three iterations of the for loop?
Question 23
True/False
In a sequential search, the array must be sorted.
Question 24
Multiple Choice
Which technique does a binary search use to find an element in a list?
Question 25
True/False
A binary search starts by comparing the search item to the first item in the list.
Question 26
True/False
The selection sort algorithm repeatedly moves the smallest element from the unsorted list to the top of the unsorted list.
Question 27
True/False
Selection sort uses nested for loops.
Question 28
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 95 is in list. Exactly how many key comparisons are executed by the sequential search algorithm?
Question 29
True/False
A selection sort always starts with the middle element of the list.
Question 30
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 31
Multiple Choice
Consider the following list. list = {5, 11, 25, 28, 45, 78, 100, 120, 125}; Suppose that binary search as discussed in the book is used to determine whether 28 is in list. Exactly how many key comparisons are executed by binary search?