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

26/59

Page

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

Who proposed the depth first backtracking algorithm?

Select an option to see the answer and solution.

Which of the following option is wrong about natural numbers?

Select an option to see the answer and solution.

Which among the following is an application of graph matching?

Select an option to see the answer and solution.

A node is said to be . . . . . . . . if it has a possibility of reaching a complete solution.

Select an option to see the answer and solution.

Bifid cipher combines transposition with which of the following cipher?

Select an option to see the answer and solution.

Which of the following sorting algorithm is NOT stable?

Select an option to see the answer and solution.

Atbash cipher was originally used for encrypting . . . . . . . .

Select an option to see the answer and solution.

Who gave the expression for the probability and expected value of gcd?

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 linear_search(int value)
{
      struct Node *temp = head->next;
      while(temp -> next != 0)
      {
            if(temp->val == value)
            return 1;
            temp = temp->next;
      }
      return 0;
}
int main()
{
     int arr[6] = {1,2,3,4,5,6};
     int n = 6,i;
     head = (struct Node*)malloc(sizeof(struct Node));
     head->next = 0;
     struct Node *temp;
     temp = head;
     for(i=0; i<n; i++)
     {
           struct Node *newNode = (struct Node*)malloc(sizeof(struct Node));
           newNode->next = 0;
           newNode->val = arr[i];
           temp->next = newNode;
           temp = temp->next;
     }
     int ans = linear_search(60);
     if(ans == 1)
       printf("Found");
     else
       printf("Not found");
     return 0;
}

Select an option to see the answer and solution.

Recursion is similar to which of the following?

Select an option to see the answer and solution.

What is the GCD according to the given Venn Diagram?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

Which of the following factors account more to the cost of Chan's algorithm?

Select an option to see the answer and solution.

Which of the following is not a property of perfect graph?

Select an option to see the answer and solution.

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;
}

Select an option to see the answer and solution.

Recursive solution of tower of hanoi problem is an example of which of the following algorithm?

Select an option to see the answer and solution.

A matching M is maximal if and only if there exists no augmenting path with respect to M.

Select an option to see the answer and solution.

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;
}

Select an option to see the answer and solution.

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

Select an option to see the answer and solution.

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?

Select an option to see the answer and solution.

What will be the encrypted text corresponding to plain text "HELLO" using standard polybius square cipher?

Select an option to see the answer and solution.