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

51/59

Page

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

What is the recurrence relation used in Strassen's algorithm?

Select an option to see the answer and solution.

Consider the following code snippet to find the smallest element in an array:
int get_min_element(int *arr, int n)
{
      int i, min_element = arr[0];
      for(i = 1; i < n; i++)
        if(_______)
          min_element = arr[i];
      return min_element;
}
Which of the following lines should be inserted to complete the above code?

Select an option to see the answer and solution.

In a FIFO algorithm, when a page is to be replaced, which of the following page is chosen?

Select an option to see the answer and solution.

The time complexity of the solution tower of hanoi problem using recursion is . . . . . . . .

Select an option to see the answer and solution.

Which of the following code will give an error?

Options are not available for this question.

Select an option to see the answer and solution.

. . . . . . . . is a data structure used to collect a system of cuts for solving min-cut problem.

Select an option to see the answer and solution.

Which of the following is a correct representation of inclusion exclusion principle (|A,B| represents intersection of sets A,B)?

Select an option to see the answer and solution.

What will be the chromatic number for a complete graph having n vertices?

Select an option to see the answer and solution.

Encryption in trithemius cipher is done using . . . . . . . .

Select an option to see the answer and solution.

What does the following recursive code do?
void my_recursive_function(int n)
{
     if(n == 0)
     return;
     my_recursive_function(n-1);
     printf("%d ",n);
}
int main()
{
     my_recursive_function(10);
     return 0;
}

Select an option to see the answer and solution.

Given below is the pseudocode of the dominating set problem. Which of the following best suits the blank?
Dominant(G = (V, E))
{
    D = { }
    while (E!=0)
    {
        pick any edge e connecting to vertices X and Y
        add one vertex between X and Y to set D
        ________________
    }
    return D;
}

Select an option to see the answer and solution.

What is the other name for quick hull problem?

Select an option to see the answer and solution.

Which of the following code will generate unique random numbers every time?

Options are not available for this question.

Select an option to see the answer and solution.

Karger's algorithm is which type of algorithm?

Select an option to see the answer and solution.

Recursive approach to find power of a number is preferred over iterative approach.

Select an option to see the answer and solution.

Number of elements in the power set of set S={1, 2, 3} will be?

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

Running time of Strassen's algorithm is better than the naive Theta(n3) method.

Select an option to see the answer and solution.

What will be the auxiliary space complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?

Select an option to see the answer and solution.

If Matrix A is of order X*Y and Matrix B is of order M*N, then what is the order of the Matrix A*B given that Y=M?

Select an option to see the answer and solution.