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

40/59

Page

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

Is Morse code speed measured in characters per minute (cpm)?

Select an option to see the answer and solution.

Choose the weakest cipher from the following?

Select an option to see the answer and solution.

How many times is the function recursive_get_len() called when the following code is executed?
#include<stdio.h>
#include<stdlib.h>
struct Node
{
      int val;
      struct Node *next;
}*head;
int recursive_get_len(struct Node *current_node)
{
      if(current_node == 0)
        return 0;
      return 1 + recursive_get_len(current_node->next);
}
int main()
{
      int arr[10] = {-1,2,3,-3,4,5}, n = 6, 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->val = arr[i];
          newNode->next = 0;
          temp->next = newNode;
          temp = temp->next;
      }
      int len = recursive_get_len(head->next);
      printf("%d",len);
      return 0;
}

Select an option to see the answer and solution.

What is the minimal dominating set for the graph given below?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

How many times is the function recursive_search_num() called when the following code is executed?
#include<stdio.h>
int recursive_search_num(int *arr, int num, int idx, int len)
{
     if(idx == len)
     return -1;
     if(arr[idx] == num)
     return idx;
     return recursive_search_num(arr, num, idx+1, len);
}
int main()
{
      int arr[8] ={1,2,3,3,3,5,6,7},num=5,len = 8;
      int indx = recursive_search_num(arr,num,0,len);
      printf("Index of %d is %d",num,indx);
      return 0;
}

Select an option to see the answer and solution.

What is the independence number of the graph given below?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

In terms of Venn Diagram, which of the following expression gives LCM (Given A ꓵ B ≠ Ø)?

Select an option to see the answer and solution.

What is the alternative name given to Rail fence cipher?

Select an option to see the answer and solution.

In a graph, a maximal independent set is also a dominating set.

Select an option to see the answer and solution.

What will be the ciphered text corresponding to "ALGORITHM" if gronsfeld cipher is used for encryption with key "4321"?

Select an option to see the answer and solution.

Which graph is also known as biclique?

Select an option to see the answer and solution.

Consider the following pseudocode for the edge coloring problem of a graph. Which of the following best suits the blank?
Start traversing the graph using BFS traversal 
Pick up any vertex from the graph  
__________________________  
Traverse one its edges 
Repeat until all the edges of the graph are covered

Select an option to see the answer and solution.

If GCD of two numbers is 1, then the two numbers are said to be . . . . . . . .

Select an option to see the answer and solution.

What will be the time complexity of the code to find a minimum element from an array of size n and uses square root decomposition(exclude pre processing time)?

Select an option to see the answer and solution.

Which of the following problems is not NP complete?

Select an option to see the answer and solution.

What is the GCD of 20 and 12 using Euclid's algorithm?

Select an option to see the answer and solution.

Beaufort cipher is an example of . . . . . . . .

Select an option to see the answer and solution.

What is the time complexity of the above code used to reverse a string?

Select an option to see the answer and solution.

When all software that runs on a system is known beforehand, optimal page replacement algorithm can be used in a general-purpose operating system.

Select an option to see the answer and solution.

Topological sort can be implemented by?

Select an option to see the answer and solution.