MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
A
Heap Sort
B
Merge Sort
C
Quick Sort
D
All of the above
Explanation: 

Detailed explanation-1: -Solutions for You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate? a)Heap sortb)Merge sortc)Quick sortd)Insertion sortCorrect answer is option ‘B’.

Detailed explanation-2: -The external merge sort algorithm, which sorts chunks that each fit in RAM, then merges the sorted chunks together. We first divide the file into runs such that the size of a run is small enough to fit into the main memory. Then sort each run in the main memory using the merge sort sorting algorithm.

Detailed explanation-3: -What is the best sorting algorithm to use for the elements in array are more than 1 million in general? Merge sort.

Detailed explanation-4: -Quick sort is the better suited for large data sets. [8]It is the fastest and efficient algorithm for large sets of data. But it is inefficient if the elements in the list are already sorted which results in the worst case time complexity of O(n2).

Detailed explanation-5: -An internal sort is any data sorting process that takes place entirely within the main memory of a computer.

There is 1 question to complete.