ExamVeda
Login
Home
11
Which of the following is not necessarily a stable sorting algorithm?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
12
What is the average case complexity of bubble sort?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
13
Comb sort is an improved version of . . . . . . . .
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
14
What will be the output of the given C++ code?
#include <bits/stdc++.h> 
using namespace std; 
int main() 
{ 
    int arr[] = {1, 3,4,2,5}; 
    int n = sizeof(arr)/sizeof(arr[0]);   
    sort(arr, arr+n); 
    int a;
    for ( a = 0; a< n; a++) 
        cout << arr[a] << " ";  
    return 0; 
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
15
Quick sort uses which of the following algorithm to implement sorting?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
16
What is the worst case time complexity of cube sort?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
What is the average time complexity of in place merge sort when we use the following function for merging?
void in_place_merge(int arr[], int l, int middle, int r) 
{ 
	int start2 = middle + 1; 
	if (arr[middle] <= arr[start2]) 
        { 
		return; 
	} 
	while (l <= middle && start2 <= r) 
        { 
		if (arr[l] <= arr[start2]) 
                { 
			l++; 
		} 
		else 
                { 
			int val = arr[start2]; 
			int index = start2; 
			while (index != l) 
                        { 
				arr[index] = arr[index - 1]; 
				index--; 
			} 
			arr[l] = val; 
		        l++; 
			middle++; 
			start2++; 
		} 
	} 
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
18
Merge sort can be implemented using O(1) auxiliary space.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
What will be the best case time complexity of merge sort?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
20
Quick sort uses join operation rather than merge operation.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board