Take a note while surfing.
Give your Note a Colorful Tag.
Stay on same information and in Sync wherever you are.
Organize your information,It may take Shape.
Differ your Content by Color.
Easy to pull up your content from anywhere anytime.
Don't Let information to miss,Because it take shape
Simple an Easy Way to take a note.
Get the same in next visit.
1. Which of the following algorithmic paradigm is used in the merge sort?
Answer: Option D
Explanation:Here is no explanation for this answer
Workspace
Commvault
2. What is the worst case performance of Selection sort algorithm?
Answer: Option B
Explanation:Here is no explanation for this answer
Workspace
Commvault
3. Let P be a quick sort program to sort numbers in ascending order using the first element as the pivot. Let t1 and t2 be the number of comparisons made by P for the input [1 2 3 4 5] and [4 1 5 3 2] respectively. Which one of the following holds?
Answer: Option C
Explanation:When first element or last element is chosen as pivot, Quick Sort's worst case occurs for the sorted arrays.
In every step of quick sort, numbers are divided as per the following recurrence.
T(n) = T(n-1) + O(n)
Workspace
nagarro
4. Consider the C function given below. Assume the array listA contains (n>0) elements, sorted in ascending order.
int Process array (int * list A, int x, int n)
{
int i, j, k;
i =0;j=n-1;
do {
k = (i+j)/2;
if (x<=list A[k])
j=k-1;
if (list A[k] <=x)
i =k+1;
} while (i <=j);
if (list A[k] == x)
return (k);
else
return -1;
}
Which oe of the following statements about the function Process Array is CORRECT?
Answer: Option B
Explanation:Here is no explanation for this answer
Workspace
nagarro
5. What sorting algos have their best and worst case times equal ?
Answer: Option C
Explanation:O(nlogn) for mergesort and heap sort
Workspace
Wipro
6. What data structures you should use for dictionary searching and it should be capable of doing spell check also ?
Answer: Option B
Explanation:Here is no explanation for this answer
Workspace
Wipro
7. In worst case Quick Sort has order
Answer: Option B
Explanation:Here is no explanation for this answer
Workspace
No Tags on this question yet!
8. A sort which relatively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
Answer: Option D
Explanation:Here is no explanation for this answer
Workspace
No Tags on this question yet!
9. Which of the following sorting algorithms does not have a worst case running time of O(n^2)?
Answer: Option B
Explanation:Here is no explanation for this answer
Workspace
No Tags on this question yet!
10. The quick sort algorithm exploit _________ design technique
Answer: Option C
Explanation:Here is no explanation for this answer
Workspace
No Tags on this question yet!