# Basic CS-Algorithms [3i Infotech Placement]: Sample Questions 11 - 12 of 12

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

## Question 11

## Question 12

Algorithms

### Question

MCQ▾Which of the following sorting algorithms has average sorting behaviour?

### Choices

Choice (4) | |
---|---|

a. | Merge sort |

b. | Quick sort |

c. | Heap sort |

d. | Bubble sort |

### Answer

b.### Explanation

- The quick sort uses divide and conquer to gain the same advantages as the merge sort, while not using additional storage.
- In the merge sort it is possible that the list may not be divided in half which could cause the performance to be diminished.
- A quick sort first selects a value called the pivot value- among the many ways one can simply use the first item in the list.
- Pivot value assists with splitting the list- actual position of pivot in the final sorted list- called the split point- divides the list for subsequent calls to the quick sort.
- Let us understand with an example.

**Example of quick sort**: