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

21/59

Page

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

In which of the following applications can we use the concept of articulation points?

Select an option to see the answer and solution.

What is the time complexity of the following iterative implementation used to find the length of a 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;
      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 = get_len();
      printf("%d",len);
      return 0;
}

Select an option to see the answer and solution.

What is the shortest distance between the line given by -2x + 3y + 4 = 0 and the point (5,6)?

Select an option to see the answer and solution.

Which device was used to generate high speed Morse Code?

Select an option to see the answer and solution.

Minimum time required to solve tower of hanoi puzzle with 4 disks assuming one move takes 2 seconds, will be . . . . . . . .

Select an option to see the answer and solution.

What is meant by the term lexicographical order?

Select an option to see the answer and solution.

Fractional knapsack problem is also known as . . . . . . . .

Select an option to see the answer and solution.

What will be the worst case time complexity of finding the sum of elements in a given range of (l,r) in an array of size n?

Select an option to see the answer and solution.

Counting intersections can be done using the inclusion-exclusion principle only if it is combined with De Morgan's laws of complementing.

Select an option to see the answer and solution.

Is every complete bipartite graph a Moore Graph.

Select an option to see the answer and solution.

What will be the chromatic number of the following graph?
Miscellaneous on Data Structures mcq question image

Select an option to see the answer and solution.

What will be the maximum number of rounds required to reach all nodes in the flooding algorithm?

Select an option to see the answer and solution.

Which structure can be modelled by using Bipartite graph?

Select an option to see the answer and solution.

Which of the following is called the "ultimate planar convex hull algorithm"?

Select an option to see the answer and solution.

What is the definition of graph according to graph theory?

Select an option to see the answer and solution.

Gronsfeld cipher is an example of . . . . . . . .

Select an option to see the answer and solution.

Who publish the bitwise operation method to solve the eight queen puzzle?

Select an option to see the answer and solution.

What is the output of the following code?
#include<stdio.h>
int sum_of_digits(int n)
{
      int sm = 0;
      while(n != 0)
      {
          sm += n%10;
          n /= 10;
      }
      return sm;
}
int main()
{
      int n = 1234;
      int ans = sum_of_digits(n);
      printf("%d",ans);
      return 0;
}

Select an option to see the answer and solution.

The most common hamming codes are a generalized version of?

Select an option to see the answer and solution.

Topological sort can be applied to which of the following graphs?

Select an option to see the answer and solution.