ExamVeda
Login
Home
11
What is the GCD according to the given Venn Diagram?
Miscellaneous on Data Structures mcq question image
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
12
Which of the following factors account more to the cost of Chan's algorithm?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
13
Which of the following is not a property of perfect graph?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
14
How many times will the function fact() be called when the following code is executed?
int fact(int n)
{
      if(n == 0)
        return 1;
      return n * fact(n - 1);
}
int main()
{
      int n = 5;
      int ans = fact(n);
      printf("%d",ans);
      return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
15
Recursive solution of tower of hanoi problem is an example of which of the following algorithm?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
16
A matching M is maximal if and only if there exists no augmenting path with respect to M.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
17
How many times will the function recursive_get_min() be called when the following code is executed?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
     int val;
     struct Node* next;
}*head;
int min_of_two(int a, int b)
{
      if(a < b)
        return a;
      return b;
}
int recursive_get_min(struct Node* temp)
{
      if(temp->next == 0)
        return  temp->val;
      return min_of_two(temp->val,recursive_get_min(temp->next));
}
int main()
{
     int n = 5, arr[5] ={1,1,1,1,1},i;
     struct Node *temp, *newNode;
     head = (struct Node*)malloc(sizeof(struct Node));
     head -> next =0;
     temp = head;
     for(i=0;i<n;i++)
     {
           newNode =(struct Node*)malloc(sizeof(struct Node));
           newNode->next = 0;
           newNode->val = arr[i];
           temp->next =newNode;
           temp = temp->next;
     }
     int min_num = recursive_get_min(head->next);
     printf("%d",min_num);
     return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
18
Consider the following algorithm of Karger's algorithm given below. Which of the following best suits the blank?
Let G=(V, E)
while (V > 2)
  pick any edge e from E randomly
  __________________________
  remove self-loops
return the cut left with last 2 vertices
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
19
What is the result of the recurrences which fall under the extended second case of Master's theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=nc(log n)k?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
20
What will be the encrypted text corresponding to plain text "HELLO" using standard polybius square cipher?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board