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

27/59

Page

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

What is the rule for encryption in playfair cipher if the letters in a pair are identical?

Select an option to see the answer and solution.

Optimal page replacement algorithm is implemented in . . . . . . . .

Select an option to see the answer and solution.

The number of colors used by a proper coloring graph is called?

Select an option to see the answer and solution.

Playfair cipher is harder to crack than keyword cipher.

Select an option to see the answer and solution.

What happens when the backtracking algorithm reaches a complete solution?

Select an option to see the answer and solution.

Vigenere cipher is an example of . . . . . . . .

Select an option to see the answer and solution.

How many Hamiltonian paths does the following graph have?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

If GCD of two number is 8 and LCM is 144, then what is the second number if first number is 72?

Select an option to see the answer and solution.

Which one of the following is an application for matching?

Select an option to see the answer and solution.

Tower of hanoi problem can be solved iteratively.

Select an option to see the answer and solution.

How many rows will the letters of the plain text occupy in the table, that is used for encryption in columnar transposition cipher when a given keyword is "SECRET" and plain text is "DATASTRUCTURE"?

Select an option to see the answer and solution.

Which of the following can be the base case for the recursive implementation used to find the length of linked list?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
      int val;
      struct Node *next;
}*head;
int get_len()
{
      struct Node *temp = head->next;
      int len = 0;
      while(temp != 0)
      {
          len++;
          temp = temp->next;
      }
      return len;
}
int main()
{
      int arr[10] = {1,2,3,4,5}, n = 5, i;
      struct Node *temp, *newNode;
      head = (struct Node*)malloc(sizeof(struct Node));
      head->next = 0;
      int len = get_len();
      printf("%d",len);
      return 0;
}

Select an option to see the answer and solution.

How many iterating statements are involved in the naive method of matrix multiplication?

Select an option to see the answer and solution.

Calculating the chromatic number of a graph is a

Select an option to see the answer and solution.

What will be the size of a key matrix if the plain text is "SECRET"?

Select an option to see the answer and solution.

What is the simplest method to prove that a graph is bipartite?

Select an option to see the answer and solution.

How many times is the function linear_search() called when the following code is executed?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
     int val;
     struct Node* next;
}*head;
int linear_search(struct Node *temp,int value)
{
      if(temp == 0)
         return 0;
      if(temp->val == value)
         return 1;
      return linear_search(temp->next, value);
}
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(head->next,6);
     if(ans == 1)
       printf("Found");
     else
       printf("Not found");
    return 0;
}

Select an option to see the answer and solution.

Which of the following cipher requires only one key for decoding the ciphered text?

Select an option to see the answer and solution.

Can stable marriage cannot be solved using branch and bound algorithm.

Select an option to see the answer and solution.

Which of the following cipher uses a key book or a key text instead of a keyword?

Select an option to see the answer and solution.