Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Which of the following sorting algorithms is described by this text? Find the smallest item in the array or ArrayList, and store it at index

Which of the following sorting algorithms is described by this text? "Find the smallest item in the array or ArrayList, and store it at index 0. Then, find the smallest remaining item, and store it at index 1. Continue this process until all items are placed into the array or ArrayList." (3 points)

Question 8 options:

1) insertion sort
2) selection sort
3) mergesort
4) quick sort
5) binary sort

What is required to implement a binary search? (2 points)

Question 9 options:

1) a pivot value
2) recursion
3) sorted data
4) a hash table
5) None of the above is required

An array of integers is to be sorted from smallest to biggest using an insertion sort. Assume the array originally contains the following elements:

9 13 24 3 17 20

What will it look like after the third pass through the for loop? (3 points)

Question 10 options:

1) 9 13 24 3 17 20
2) 3 9 13 24 17 20
3) 9 13 24 3 20 17
4) 3 9 13 17 24 20
5) 3 9 13 17 20 24

An array of integers is to be sorted from smallest to biggest using a selection sort. Assume the array originally contains the following elements:

10 12 23 4 16 21

What will it look like after the third pass through the for loop? (3 points)

Question 11 options:

1) 4 10 23 12 16 21
2) 4 10 12 16 21 23
3) 4 10 12 16 23 21
4) 4 12 23 10 16 21
5) 4 10 12 23 16 21

What is the minimum number of locations that a sequential search algorithm will have to examine when looking for a particular value in an array of 300 elements? (2 points)

Question 4 options:

1) 1
2) 6
3) 7
4) 8
5) 100

Which of the following sorting algorithms is the fastest? (2 points)

Question 1 options:

1) insertion sort
2) selection sort
3) mergesort
4) hash sort
5) bubble sort

Which sorting algorithm will be fastest when run on an array that happens to already be in order? (2 points)

Question 2 options:

1) insertion sort
2) selection sort
3) binary sort
4) All of these algorithms will run at the same speed.
5) It is not possible to know which will be fastest.

What is the maximum number of locations that a sequential search algorithm will have to examine when looking for a particular value in an array of 200 elements? (2 points)

Question 3 options:

1) 200
2) 100
3) 50
4) 25
5) 1

What is the minimum number of locations that a binary search algorithm will have to examine when looking for a particular value in a sorted array of 200 elements? (2 points)

Question 5 options:

1) 1
2) 6
3) 7
4) 8
5) 200

What is the maximum number of locations that a binary search algorithm will have to examine when looking for a particular value in a sorted array of 300 elements? (2 points)

Question 6 options:

1) 1
2) 7
3) 8
4) 9
5) 300

Which of the following is not a quadratic sorting algorithm??(2 points)

I. insertion sort II. selection sort III. mergesort

Question 7 options:

1) I only
2) II only
3) III only
4) I and II only
5) I, II, and III

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

Advances In Databases 11th British National Conference On Databases Bncod 11 Keele Uk July 7 9 1993 Proceedings Lncs 696

Authors: Michael F. Worboys ,Anna F. Grundy

1993rd Edition

3540569219, 978-3540569213

More Books

Students also viewed these Databases questions