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

35/59

Page

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

What is the following expression, lcm (a, gcd (a, b)) equal to?

Select an option to see the answer and solution.

What will be time complexity when binary search is applied on a linked list?

Select an option to see the answer and solution.

Which happens if the fast-moving pointer(hare) reaches the tail of the linked list?

Select an option to see the answer and solution.

In a bipartite graph G=(V,U,E), the matching of a free vertex in V to a free vertex in U is called?

Select an option to see the answer and solution.

Morse Code is named after which scientist?

Select an option to see the answer and solution.

Which one of the following is not an application of max-flow min-cut algorithm?

Select an option to see the answer and solution.

What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?

Select an option to see the answer and solution.

Which of the following refers to the minimum number of colors, with which the edges of the graph can be colored?

Select an option to see the answer and solution.

Is Coppersmith-Winograd algorithm better than Strassen's algorithm in terms of time complexity?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

Solve the following recurrence using Master's theorem.
T(n) = 4T (n/2) + n2

Select an option to see the answer and solution.

What will be the chromatic index for an empty graph having n vertices?

Select an option to see the answer and solution.

Which of the following refers to the set of non-adjacent vertices?

Select an option to see the answer and solution.

What is the rule for encryption in playfair cipher if the letters in a pair appear in same column?

Select an option to see the answer and solution.

Strassen's algorithm is quite numerically stable as the naive method.

Select an option to see the answer and solution.

What will be the lexicographical order of combinations of 2 elements each formed from the array arr={1,2,3}?

Select an option to see the answer and solution.

What is the objective of the knapsack problem?

Select an option to see the answer and solution.

Who is the formulator of Maximum flow problem?

Select an option to see the answer and solution.

What is the length of an augmenting path?

Select an option to see the answer and solution.

Consider a reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 of frame size 3. Calculate the number of page faults using optimal page replacement algorithm.

Select an option to see the answer and solution.