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

14/59

Page

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

Running key cipher is an example of . . . . . . . .

Select an option to see the answer and solution.

All the graphs have a dominating set of vertices.

Select an option to see the answer and solution.

What will be the ciphered text corresponding to "EXAMPLE" if gronsfeld cipher is used for encryption with key as "1234"?

Select an option to see the answer and solution.

The result of the fractional knapsack is greater than or equal to 0/1 knapsack.

Select an option to see the answer and solution.

Which of the following is the time complexity of finding nth Catalan numbers using binomial coefficient?

Select an option to see the answer and solution.

What will be the plain text corresponding to ciphered text "|_ _| >" if pigpen cipher is used for encryption?

Select an option to see the answer and solution.

What is the time complexity of the following iterative method used to find the sum of the first n natural numbers?
#include<stdio.h>
int get_sum(int n)
{
      int sm, i;
      for(i = 1; i <= n; i++)
        sm += i;
      return sm;
}
int main()
{
    int n = 10;
    int ans = get_sum(n);
    printf("%d",ans);
    return 0;
}

Select an option to see the answer and solution.

How many colours are used in a bipartite graph?

Select an option to see the answer and solution.

Which among the following best represents the time complexity to find articulate points in a graph?

Select an option to see the answer and solution.

LCM is also called as . . . . . . . .

Select an option to see the answer and solution.

For which device was Morse code developed for?

Select an option to see the answer and solution.

Consider the following recursive implementation to find the largest element in a linked list:
struct Node
{
     int val;
     struct Node* next;
}*head;
int max_of_two(int a, int b)
{
      if(a > b)
        return a;
      return b;
}
int recursive_get_max(struct Node* temp)
{
      if(temp->next == 0)
        return  temp->val;
      return max_of_two(______, _______);
}
Which of the following arguments should be passed to the function max_of two() to complete the above code?

Select an option to see the answer and solution.

Which of the following statement is incorrect with respect to generalizing the solution using the inclusion-exclusion principle?

Select an option to see the answer and solution.

Which of the following cipher is easiest to crack?

Select an option to see the answer and solution.

Under what condition any set A will be a subset of B?

Select an option to see the answer and solution.

Suppose the first fibonnaci number is 0 and the second is 1. What is the sixth fibonnaci number?

Select an option to see the answer and solution.

What will be the output for the given code?
#include <stdio.h>
bool func (int arr[], int n) 
{ 
	int sum = 0; 
	int i, j; 
	for (i = 0; i < n; i++) 
	sum += arr[i];
	if (sum%2 != 0) 
	return false; 
	bool partition[sum/2+1][n+1]; 
	for (i = 0; i <= n; i++) 
	partition[0][i] = true; 
	for (i = 1; i <= sum/2; i++) 
	partition[i][0] = false;	 
	for (i = 1; i <= sum/2; i++) 
	{ 
	    for (j = 1; j <= n; j++) 
	    { 
		partition[i][j] = partition[i][j-1]; 
		if (i >= arr[j-1]) 
		partition[i][j] = partition[i][j] || partition[i - arr[j-1]][j-1]; 
	    }		 
	}	 
	return partition[sum/2][n]; 
}	
int main() 
{ 
    int arr[] = {3, 3, 4, 4, 7}; 
    int n = sizeof(arr)/sizeof(arr[0]); 
    if (func(arr, n) == true) 
	printf("true"); 
    else
	printf("false"); 
    return 0; 
}

Select an option to see the answer and solution.

When was the first solution to Eight Queen Puzzle published?

Select an option to see the answer and solution.

What will be the chromatic index of the following graph?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

If Matrix X is of order A*B and Matrix Y is of order C*D, and B=C then the order of the Matrix X*Y is A*D?

Select an option to see the answer and solution.