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

19/59

Page

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

Can there exist a graph which is both eulerian and is bipartite?

Select an option to see the answer and solution.

Using the inclusion-exclusion principle, find the number of integers from a set of 1-100 that are not divisible by 2, 3 and 5.

Select an option to see the answer and solution.

Autokey cipher is closely related to . . . . . . . .

Select an option to see the answer and solution.

Which of the following algorithm can be used to find the minimum cut of a connected graph?

Select an option to see the answer and solution.

For an euler tour of a tree, how many vertices are required to store euler tour?

Select an option to see the answer and solution.

Which type of flooding doesn't send every incoming packet on every outgoing line?

Select an option to see the answer and solution.

In how many directions do queens attack each other?

Select an option to see the answer and solution.

How many permutations will be formed from the array arr={1, 2, 3}?

Select an option to see the answer and solution.

What is the time complexity of the following implementation of linear search on a linked list?
#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 != 0)
      {
           if(temp->val == value)
             return 1;
           temp = temp->next;
      }
      return 0;
}
int main()
{
     int arr[5] = {1,2,3,4,5};
     int n = 5,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(-1);
     if(ans == 1)
     printf("Found");
     else
     printf("Not found");
     return 0;
}

Select an option to see the answer and solution.

Which word tells a word rate of Morse code's shorter code durations for common characters such as "e" and "t".?

Select an option to see the answer and solution.

Encryption in Route cipher is done . . . . . . . .

Select an option to see the answer and solution.

Is gcd an associative function.

Select an option to see the answer and solution.

What will be the output of the following code?
#include<iostream>
using namespace std;
int list[200];
void func(int n, int m = 0)
{
    int i;
    if(n == 0)
    {
         for(i = 0; i < m; ++i)
         printf("%d ", list[i]);
         printf("\n");
         return;
    }
    for(i = n; i > 0; --i)
    {
         if(m == 0 || i <= list[m - 1])
         {
             list[m] = i;
             func(n - i, m + 1);
         }
    }
 
}
int main()
{
	int n=3;
	func(n,0);
	return 0;
}

Options are not available for this question.

Select an option to see the answer and solution.

Does Ford- Fulkerson algorithm use the idea of?

Select an option to see the answer and solution.

What is the significance of indicator block in running key cipher?

Select an option to see the answer and solution.

Which of the following is used to find the absolute value of the argument in C++?

Select an option to see the answer and solution.

Which of the following approach should be used to find the solution of the activity selection problem?

Select an option to see the answer and solution.

What will be the ciphered text corresponding to "ALGORITHM" if beaufort cipher is used for encryption with key as "KEY"?

Select an option to see the answer and solution.

Which of the following is required to determine the number of page faults in FIFO?

Select an option to see the answer and solution.

What will be the plain text corresponding to cipher text "PROTO" if vigenere cipher is used with keyword as "HELLO"?

Select an option to see the answer and solution.