ExamVeda
Login
Home
11
Which of the following version of tree sort will have the highest worst case time complexity?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
12
In average case Heap sort is as efficient as the Quick sort.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
13
Quick sort uses which of the following method to implement sorting?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
14
LSD radix sort is in-place sorting algorithm.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
15
What is the average case time complexity of cube sort?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
16
The gap between two elements being compared shrinks by a factor of . . . . . . . . after every iteration.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
The following function represents which sorting?
void Sorting(int a[], int n) 
{ 
	bool swap = true; 
	int first = 0; 
	int last = n - 1; 
 
	while (swap) 
        { 
 
		swap = false; 
 
		for (int i = first; i < last;i++)
                { 
			if (a[i] > a[i + 1]) 
                        { 
				swap(a[i], a[i + 1]); 
				swap = true; 
			} 
		} 
 
		if (!swap) 
			break; 
 
		swap = false; 
 
		--last; 
 
 
		for (int i = last - 1; i >= first; i--)
                { 
			if (a[i] > a[i + 1]) 
                        { 
				swap(a[i], a[i + 1]); 
				swap = true; 
			} 
		} 
 
		++first; 
	} 
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
18
What is the best case time complexity of odd-even sort?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
The insert() procedure, given below, builds the BST on the input elements, which is the first step of the binary tree sort. Choose the correct to fill the condition.
void insert(Tree* node, int newElement)
{
	if(node== NULL)
	{
		node = createNewNode();
		node-> value = newElement;
		node -> left = NULL;
		node -> right = NULL;
		return;
	}
	else if(__________________)
	{
		insert(node->left, newElement);
	}
	else
	{
		insert(node->right, newElement);
	}
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
20
What is the worst case time complexity of binary insertion sort?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board