An Algorithm

Question 1 (1.5 points)

Don't use plagiarized sources. Get Your Custom Essay on
An Algorithm
Just from \$13/Page

An algorithm in which we divide the problem into subproblem and then we combine the subsolutions to form solution to the original problem is known as:

Question 1 options:

 1) Randomized algorithm

 2) Divide and Conquer

 3) Greedy Algorithm

 4) None of the mentioned

Question 2 (1.5 points)

The worst case occurs in linear search algorithm when

Question 2 options:

 1) Item is somewhere in the middle of the array

 2) Item is not in the array at all

 3) Item is the last element in the array

 4) Item is the last element in the array or is not there at all

Question 3 (1.5 points)

How would you define a good algorithm?

Question 3 options:

 1) One that produces the correct answer.

 2) One that produces the correct answer and is easy to code.

 3) One that is computationally efficient and is easy to code.

 4) One that is computationally efficient.

 5) One that produces the correct answer and is computationally efficient.

Question 4 (1.5 points)

In ________ search each element is compared with x till found or till all elements have been compared.

Question 4 options:

 1) None of the mentioned

 2) Sequential

 3) Merge

 4) Binary

Question 5 (1.5 points)

Suppose you are doing a sequential (linear) search of the ordered list [2, 5, 7, 8, 10, 13, 14, 16, 19, 20]. How many comparisons would you need to do in order to find the key 13?

Question 5 options:

 1) 6

 2) 5

 3) 10

 4) 7

Question 6 (1.5 points)

To sort a list with n elements, the insertion sort begins with the __________ element.

Question 6 options:

 1) First

 2) Second

 3) Third

 4) Fourth

Question 7 (1.5 points)

A binary search algorithm begins at the _____ of a list.

Question 7 options:

 1) End

 2) Start

 3) Top

 4) Bottom

 5) Middle

Question 8 (1.5 points)

The operation of processing each element in the list is known as

Question 8 options:

 1) Sorting

 2) Merging

 3) Merging

 4) Traversal

Question 9 (1.5 points)

An algorithm is a _________ set of precise instructions for performing computation.

Question 9 options:

 1) Infinite

 2) Finite

 3) Constant

 4) None of the mentioned

Question 10 (1.5 points)

Suppose you have the following list of numbers to sort: [19, 1, 9, 7, 3, 10, 13, 15, 8, 12]. Which list represents the partially sorted list after three complete passes of bubble sort?

Question 10 options:

 1) [1, 3, 7, 9, 10, 8, 12, 13, 15, 19]

 2) [1, 7, 3, 9, 10, 13, 8, 12, 15, 19]

 3) [1, 9, 19, 7, 3, 10, 13, 15, 8, 12]

 4) [1, 9, 19, 7, 3, 10, 13, 15, 8, 12]

Submit Quiz0 of 10 questions saved

Bottom of Form

ORDER NOW »»

and taste our undisputed quality.