21.
What will be the base case in the function of binary search used in the code of binary insertion sort? (high and low are the rightmost and leftmost index of array respectively and item is the element whose correct position is to be determined by the binary search function)

If(high<=low) 
{ 
    If(Item>a[low])
    return low+1;
    return low;
}

If(high>=low)
{
    If(Item<a[low])
    return low+1;
    return low;
}

If(high<=low)
{
    If(Item<a[low])
    return low;
    return low+1;
}

If(high<=low)
{  
    If(Item>a[low])
    return low;
    return low+1;
}

22.
What is an external sorting algorithm?

25.
Statement 1: Shell sort is a stable sorting algorithm.
Statement 2: Shell sort is an in-place sorting algorithm.

26.
Choose the correct statement regarding binary insertion sort?

27.
Bucket sort is most efficient in the case when . . . . . . . .

29.
For the following question, how will the array elements look like after second pass?
34, 8, 64, 51, 32, 21

Read More Section(Sorting Algorithms)

Each Section contains maximum 100 MCQs question on Sorting Algorithms. To get more questions visit other sections.