Prime

#### Prepinsta Prime

Video courses for company/skill based Preparation

(Check all courses)
Get Prime Video
Prime

#### Prepinsta Prime

Purchase mock tests for company/skill building

(Check all mocks)
Get Prime mock

# HackerRank Divide and Conquer Quiz-1

Question 1

Time: 00:00:00
Which of the following is correct about the divide and conquer?

it divided into smaller subproblems and then solve each problem independently

it divided into smaller subproblems and then solve each problem independently

the problem should be able to be divided into smaller overlapping sub-problem

the problem should be able to be divided into smaller overlapping sub-problem

the closest solution that seems to provide an optimum solution is chosen

the closest solution that seems to provide an optimum solution is chosen

none

none

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 2

Time: 00:00:00
What are the steps involved in solving divide and conquer problems?

Divide/Break

Divide/Break

Conquer/Solve

Conquer/Solve

Merge/Combine

Merge/Combine

All the mention

All the mention

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 3

Time: 00:00:00
Which of the following is the Example of a divide and conquer algorithm?

Merge Sort

Merge Sort

Quick Sort

Quick Sort

Binary Search

Binary Search

All the above

All the above

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 4

Time: 00:00:00
Which algorithm picks a pivot element, rearranges the array elements in such a way that all elements smaller than the picked pivot element move to the left side of the pivot, and all greater elements move to the right side?

Quick sort

Quick sort

Merge sort

Merge sort

Selection sort

Selection sort

Heap sort

Heap sort

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 5

Time: 00:00:00
What is the best, worst, and average-case time complexity of QuickSort?

O(nlogn), O(n2) and O(nlogn)

O(nlogn), O(n2) and O(nlogn)

O(n), O(nlogn) and O(nlogn)

O(n), O(nlogn) and O(nlogn)

O(n), O(n2) and O(nlogn)

O(n), O(n2) and O(nlogn)

O(n2), O(n2) and O(logn)

O(n2), O(n2) and O(logn)

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 6

Time: 00:00:00
The sub-problem by calling recursively until sub-problem solved is known as

Divide

Divide

Conquer

Conquer

Combine

Combine

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 7

Time: 00:00:00
The Sub problem Solved so that we will find a problem solution is called a

Combine

Combine

Conquer

Conquer

Divide

Divide

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 8

Time: 00:00:00
This involves dividing the problem into some sub-problem is termed as

Conquer

Conquer

Combine

Combine

Divide

Divide

None

None

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 9

Time: 00:00:00
This involves dividing the problem into some sub-problem is termed as

Selection sort

Selection sort

Binary search

Binary search

Quick sort

Quick sort

Merge sort

Merge sort

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 10

Time: 00:00:00
Which is a quick sort of randomized?

quick-sort with random output

quick-sort with random output

quick-sort with random input

quick-sort with random input

quick-sort with a random choice of pivot

quick-sort with a random choice of pivot

quick-sort with random partitions

quick-sort with random partitions

Once you attempt the question then PrepInsta explanation will be displayed.