Description

This mock test of Divide And Conquer (Basic Level) - 1 for Computer Science Engineering (CSE) helps you for every Computer Science Engineering (CSE) entrance exam.
This contains 10 Multiple Choice Questions for Computer Science Engineering (CSE) Divide And Conquer (Basic Level) - 1 (mcq) to study with solutions a complete question bank.
The solved questions answers in this Divide And Conquer (Basic Level) - 1 quiz give you a good mix of easy questions and tough questions. Computer Science Engineering (CSE)
students definitely take this Divide And Conquer (Basic Level) - 1 exercise for a better result in the exam. You can find other Divide And Conquer (Basic Level) - 1 extra questions,
long questions & short questions for Computer Science Engineering (CSE) on EduRev as well by searching above.

QUESTION: 1

The way a card game player arranges his cards as he picks them up one by one, is an example of

Solution:

It is done only by insertion sort because in insertion sort we compare the one card to another all inserted card.

*Multiple options can be correct

QUESTION: 2

You want to check whether a given set of items is sorted. Which of the following sorting methods will be the most efficient if it is already is sorted order?

Solution:

if we want to check if given input is sort or not then one pass of bubble sort and n pass of insertion sort with each has work of O(1) are best i.e.take O(n) time.

QUESTION: 3

Which of the following sorting methods will be the best if number of swappings done, is the only measure of efficiency?

Solution:

If number of swapping is the measure of efficiency of algorithm the selection sort is best since it cannot take swap more than O(n).

QUESTION: 4

You are asked to sort 15 randomly generated numbers. You should prefer

Solution:

In-order traversal of a Binary Search Tree lists the nodes in ascending order.

QUESTION: 5

As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be

Solution:

Rearranging the library books in a shelf in proper order is same as arranging cards. So insertion sort should be preferred.

QUESTION: 6

Which of the following algorithms exhibits the unnatural behaviour that, minimum number of comparisons are needed if the list to be sorted is in the reverse order and maximum number of comparisons are needed if they are already in sorted order?

Solution:

Binary insertion sort take minimum comparison if the list to be sorted is in reverse order and maximum number of comparison if they already in sorted order.

QUESTION: 7

Which of the following sorting methods sorts a given set of items that is already in sorted order or in reverse sorted order with equal speed?

Solution:

Quick sort has two worst cases, when input is in either ascending or descending order, it takes same time O(n^{2}).

QUESTION: 8

Which of the following algorithm design technique is used in the quick sort algorithm?

Solution:

Quick sort algorithm uses divide and conquer technique. It divides the data set every time on pivot element and keep on sorting each data set recursively.

QUESTION: 9

A binary search tree contains the values -1, 2, 3, 4, 5, 6, 7 and 8. The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output?

Solution:

Preorder is root, left, right.

- So, option (b) can’t be a valid output. Since, 5 being the root and [312] a left sub-tree and [6487] being a right sub tree. But, 4 < 5, so not possible.
- In option (a), considering 5 as root, [786] becomes the right sub tree. Further, 7 being the root 6 can’t be apart of right sub-tree.
- Similarly, we can shown (c) can’t be a valid output.
- So, (d) can be the only possible valid output.

QUESTION: 10

Which of the following also called "diminishing interment sort"?

Solution:

The shell sort sometimes called the “diminishing increment sort" improves on the insertion sort by breaking the original list into a number of smaller sub list each of which is sorted using an insertion sort.

### Divide & Conquer - PPT

Doc | 25 Pages

### Divide and Conquer

Doc | 13 Pages

### Divide and Conquer

Doc | 13 Pages

### Divide & Conquer - PPT

Doc | 16 Pages

- Divide And Conquer (Basic Level) - 1
Test | 10 questions | 30 min

- Divide And Conquer (Basic Level) - 2
Test | 10 questions | 30 min

- Divide And Conquer (Advance Level) - 1
Test | 15 questions | 45 min

- Test: Divide and Conquer- 1
Test | 15 questions | 35 min

- Dynamic Programming And Divide-And-Conquer MCQ - 1
Test | 20 questions | 60 min