Vidyalelo
Data Structure · all questions

Miscellaneous on Data Structures
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

1,171

Questions

31/59

Page

Pick an option on a question to see the right answer and solution.

Recursion is a method in which the solution of a problem depends on . . . . . . . .

Select an option to see the answer and solution.

Which of the following refers to the domination number of a graph?

Select an option to see the answer and solution.

Minimum number of colors required for proper edge coloring of a graph is called?

Select an option to see the answer and solution.

. . . . . . . . is an arithmetic function that calculates the total number of positive integers less than or equal to some number n, that are relatively prime to n.

Select an option to see the answer and solution.

Consider a simple graph G with 18 vertices. What will be the size of the maximum independent set of G, if the size of the minimum vertex cover of G is 10?

Select an option to see the answer and solution.

A k-regular bipartite graph is the one in which degree of each vertices is k for all the vertices in the graph. Given that the bipartitions of this graph are U and V respectively. What is the relation between them?

Select an option to see the answer and solution.

Which of the following algorithm can be used for finding articulation points in a graph?

Select an option to see the answer and solution.

What is the output of the following code:
#include<stdio.h>
#include<stdlib.h>
struct Node
{
     int val;
     struct Node* next;
}*head;
int get_max()
{
      struct Node* temp = head->next;
	  int max_num = temp->val;
	  while(temp != 0)
	  {
	        if(temp->val > max_num)
		    max_num = temp->val;
		temp = head->next;
	  }
	  return max_num;
}
int main()
{
      int n = 9, arr[9] ={5,1,3,4,5,2,3,3,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 max_num = get_max();
      printf("%d %d",max_num);
      return 0;
}

Select an option to see the answer and solution.

What is the efficiency of Gale-Shapley algorithm used in stable marriage problem?

Select an option to see the answer and solution.

What is the space complexity of the given code?
#include<stdio.h> 
int power(int x,  int y) 
{ 
	if (y == 0) 
		return 1; 
	else if (y%2 == 0) 
		return power(x, y/2)*power(x, y/2); 
	else
		return x*power(x, y/2)*power(x, y/2); 
} 
int main() 
{ 
	int x = 2; 
    int y = 3; 
 
	printf("%d", power(x, y)); 
	return 0; 
}

Select an option to see the answer and solution.

What is the minimum value of RAND_MAX possible in any implementation?

Select an option to see the answer and solution.

What is the space complexity of the following recursive implementation to find the nth fibonacci number?
int fibo(int n)
{
     if(n == 1)
        return 0;
     else if(n == 2)
        return 1;
     return fibo(n - 1) + fibo(n - 2);
}
int main()
{
     int n = 5;
     int ans = fibo(n);
     printf("%d",ans);
     return 0;
}

Select an option to see the answer and solution.

Who coined the term 'backtracking'?

Select an option to see the answer and solution.

On removal of which of the following edges gives the minimum cut for the graph given below?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

Strassen's matrix multiplication algorithm follows . . . . . . . . technique.

Select an option to see the answer and solution.

The process of decryption is exactly same as that of encryption in beaufort cipher.

Select an option to see the answer and solution.

Consider the following recursive implementation to find the sum of digits of number:
#include<stdio.h>
int recursive_sum_of_digits(int n)
{
      if(n == 0)
        return 0;
      return _________;
}
int main()
{
      int n = 1201;
      int ans = recursive_sum_of_digits(n);
      printf("%d",ans);
      return 0;
}
Which of the following lines should be inserted to complete the above code?

Select an option to see the answer and solution.

Which of the following cipher uses polybius square?

Select an option to see the answer and solution.

What will be the ciphered text corresponding to plain text "SECRET" if atbash cipher is used for encryption?

Select an option to see the answer and solution.

Hill cipher requires prerequisite knowledge of?

Select an option to see the answer and solution.