91. Library sort is a modified version of which of the following sorting algorithm?
92. What is the worst case time complexity of bogosort?
93. Cube sort is an in place sorting algorithm.
94. What is the worst case time complexity of LSD radix sort?
95. Why is heap sort preferred over merge sort for introsort implementation?
96. Which of the following combines qualities of MSD radix sort and LSD radix sort?
97. Randomized quick sort is an in place sort.
98. In-place merge sort is a stable sort.
99. Tree sort is an online sorting algorithm.
100. Consider the following code snippet, which implements the Shell sort algorithm.
shellSort( int elements[], int num_elements , int incrmnts[], int num_incrmnts)
{
int incr, j, k, span, y;
for(incr = 0; incr ;< num_incrmnts; incr++)
{
span = incrmnts[incr]; data-structure-questions-answers-shell-sort
for( j = span; j < num_elements; j++)
{
k = j;
y = elements[j];
while (________ )
{
elements [ k] = elements[k - span];
k = k - span;
}
elements[k] = y;
}
}
Which condition will correctly implement the while loop?
shellSort( int elements[], int num_elements , int incrmnts[], int num_incrmnts)
{
int incr, j, k, span, y;
for(incr = 0; incr ;< num_incrmnts; incr++)
{
span = incrmnts[incr]; data-structure-questions-answers-shell-sort
for( j = span; j < num_elements; j++)
{
k = j;
y = elements[j];
while (________ )
{
elements [ k] = elements[k - span];
k = k - span;
}
elements[k] = y;
}
}
Which condition will correctly implement the while loop?Read More Section(Sorting Algorithms)
Each Section contains maximum 100 MCQs question on Sorting Algorithms. To get more questions visit other sections.