Merge Sort Quiz Questions And Answer

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By RosyU
R
RosyU
Community Contributor
Quizzes Created: 6 | Total Attempts: 41,396
Questions: 10 | Attempts: 2,962

SettingsSettingsSettings
Computer Science Quizzes & Trivia

Are you ready for some Merge Sort quiz questions and answers? Do you know what a merge sort is? In computer science, merge sort is known as an efficient, general-purpose, as well as comparison-based sorting algorithm. We have prepared some merge sort questions for you to practice and test your knowledge and learn more about it. We wish you the best of luck with this quiz. Now, let's go for it!


Questions and Answers
  • 1. 

    What are the correct intermediate steps of the following data set when it is being sorted with the Merge sort? 15,20,10,18

    • A.

      15,18,10,20 -- 10,18,15,20 -- 10,15,18,20

    • B.

      15,10,20,18 -- 15,10,18,20 -- 10,15,18,20

    • C.

      15,20,10,18 -- 10,15,10,18 -- 10,15,18,20

    • D.

      15,20,10,18 -- 15,10,20,18 -- 10,15,20,18

    Correct Answer
    C. 15,20,10,18 -- 10,15,10,18 -- 10,15,18,20
  • 2. 

    A merge sort

    • A.

      Divides the unsorted array into 3 sublists of equal size

    • B.

      Divides the unsorted array into 4 sublists of equal size

    • C.

      Divides the unsorted array into 2 sublists of equal size

    • D.

      Divides the unsorted array into 10 sublists of equal size

    Correct Answer
    C. Divides the unsorted array into 2 sublists of equal size
    Explanation
    Merge sort is a sorting algorithm that divides the unsorted array into two sublists of equal size. It then recursively sorts each sublist and merges them back together to obtain the sorted array. This process continues until the entire array is sorted. By dividing the array into two sublists, merge sort ensures that each sublist is sorted before merging them, resulting in a sorted array.

    Rate this question:

  • 3. 

    Which of the following is False about the merge sort algorithm?

    • A.

      It is a comparison sorting algorithm.

    • B.

      The unsorted array is divided into sub lists, which are, in turn, divided into more sub lists.

    • C.

      The unsorted array is divided into sublists. Each sublist is then sorted recursively by re-applying the algorithm.

    • D.

      All of the above statements are true.

    Correct Answer
    B. The unsorted array is divided into sub lists, which are, in turn, divided into more sub lists.
    Explanation
    The given answer states that the statement "The unsorted array is divided into sub lists, which are, in turn, divided into more sub lists" is false. However, this statement is actually true. In the merge sort algorithm, the unsorted array is divided into sublists, and then each sublist is further divided into more sublists until each sublist contains only one element. Then, the sublists are merged back together in a sorted order. Therefore, the correct answer should be "All of the above statements are true."

    Rate this question:

  • 4. 

    An array has indices ranging from x to x+n; the merge sort would be applied from c to x+n, where c

    • A.

      Is the remainder of x/2, if x is an odd number

    • B.

      Is the non-integer part of x/2

    • C.

      Is the integer part of x/2

    • D.

      Is an integer chosen arbitrarily, so long that it is smaller than x+n

    Correct Answer
    C. Is the integer part of x/2
    Explanation
    The merge sort algorithm divides an array into smaller subarrays until each subarray contains only one element. In this case, the array has indices ranging from x to x+n. The merge sort would be applied from c to x+n, where c is the integer part of x/2. This means that the merge sort would start from the middle of the array, as the integer part of x/2 would give the index that splits the array into two equal halves. This ensures that the merge sort algorithm properly divides and sorts the array.

    Rate this question:

  • 5. 

    In its typical implementation, it is not a stable sorting algorithm.

    • A.

      Quick sort

    • B.

      Merge sort

    • C.

      Both

    • D.

      None

    Correct Answer
    A. Quick sort
    Explanation
    Quick sort is not a stable sorting algorithm because it does not guarantee the relative order of equal elements in the sorted output. During the partitioning process, elements are moved around, which can change their order. This means that if there are multiple occurrences of the same element in the input, their order might not be preserved in the sorted output.

    Rate this question:

  • 6. 

    In a particular modified merge sort, the input array is divided at a position one-third of the length(N) of the array. This is the tightest upper bound on the time complexity of this modified Merge Sort.

    • A.

      N(logN base 1/3)

    • B.

      N(logN base 2/3)

    • C.

      N(logN base 3/2)

    • D.

      None of these

    Correct Answer
    C. N(logN base 3/2)
    Explanation
    In this modified merge sort, the input array is divided at a position one-third of the length(N) of the array. This means that the size of the subarrays at each level of recursion will be N/3. In merge sort, the time complexity for merging two subarrays of size N/3 is O(N/3). Since each level of recursion will have a time complexity of O(N/3), and there will be logN levels of recursion, the overall time complexity can be expressed as N(logN base 3/2). Therefore, the tightest upper bound on the time complexity of this modified merge sort is N(logN base 3/2).

    Rate this question:

  • 7. 

    You have to sort 500 MB of data and have only 50 MB of available main memory. This sorting technique is most appropriate.

    • A.

      Bubble sort

    • B.

      Selection sort

    • C.

      Quick sort

    • D.

      Merge sort

    Correct Answer
    D. Merge sort
    Explanation
    Given the limited amount of available main memory compared to the size of the data to be sorted, merge sort is the most appropriate sorting technique. Merge sort works by dividing the data into smaller chunks that can fit into the available memory, sorting them individually, and then merging them back together. This process can be repeated until the entire dataset is sorted. Since merge sort only requires a small amount of memory to hold the temporary arrays during each merge operation, it is well-suited for situations with limited memory resources.

    Rate this question:

  • 8. 

    You have to sort 2 GB of data, and have only 200 MB of available main memory. This sorting technique is most appropriate.

    • A.

      Quick sort

    • B.

      Merge sort

    • C.

      Selection sort

    • D.

      Bubble sort

    Correct Answer
    B. Merge sort
    Explanation
    Merge sort is the most appropriate sorting technique in this scenario because it is a stable, efficient, and external sorting algorithm. It works by dividing the data into smaller chunks that can fit into the available memory, sorting them individually, and then merging them back together. This allows for efficient sorting of large amounts of data with limited memory. Quick sort, selection sort, and bubble sort are not suitable for this situation because they either require more memory or are less efficient for large datasets.

    Rate this question:

  • 9. 

    You have to sort 1 GB of data, and have only 100 MB of available main memory. This sorting technique is most appropriate.

    • A.

      Quick sort

    • B.

      Bubble sort

    • C.

      Merge sort

    • D.

      None of these

    Correct Answer
    C. Merge sort
    Explanation
    Merge sort is the most appropriate sorting technique in this scenario because it is a stable, efficient, and external sorting algorithm. It uses a divide and conquer approach, which allows it to handle large amounts of data by splitting it into smaller manageable chunks. Since we only have 100 MB of available memory, merge sort can efficiently sort the data by reading and writing chunks of data to and from disk, minimizing the need for excessive memory usage. Additionally, merge sort has a time complexity of O(n log n), making it efficient for large datasets.

    Rate this question:

  • 10. 

    This sorting algorithm is with the lowest worst-case complexity.

    • A.

      Merge sort

    • B.

      Quick sort

    • C.

      Bubble sort

    • D.

      None of these

    Correct Answer
    A. Merge sort
    Explanation
    Merge sort is the correct answer because it has the lowest worst-case complexity among the given sorting algorithms. Merge sort has a time complexity of O(n log n) in the worst case, which means it can efficiently handle large data sets. Quick sort also has a time complexity of O(n log n) in the average case, but it can have a worst-case time complexity of O(n^2) in certain scenarios. Bubble sort, on the other hand, has a worst-case time complexity of O(n^2), making it less efficient than merge sort. Therefore, merge sort is the best choice for sorting algorithms with the lowest worst-case complexity.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Aug 25, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 25, 2011
    Quiz Created by
    RosyU
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.