All Exams Test series for 1 year @ ₹349 only
Question

A sorting technique that guarantees that records with the same primary key occurs in the same

order in the sorted list as in the original unsorted list is said to be

The correct answer is

Stable

If you sort this list based on the primary key (the number), a stable sorting algorithm would ensure that because (5, A) appeared before (5, C) in the original list, it will also appear before (5, C) in the sorted list.

Was this answer helpful?

Important Questions from Sorting - Teaching

  1. Which of the following is stable sort

  2. Arrange the following items in ascending order using Bubble Sort. What is the intermediate sequence of 37, 54, 21, 85, 68, 12, 9, and 57 after the second pass?

  3. Which of the following algorithm design approach is used in Quick sort algorithm?

  4. What is the worst case running time of quick sort algorithm?

  5. Sort the following list using the Radix sort algorithm.

    329, 457, 839, 436, 720, 355, 657

    What is the output of the algorithm after the second pass?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App