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

28/59

Page

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

Consider the given page reference string 0, 1, 3, 7, 1, 7, 0, 3, 6, 8. How many page faults will occur if the program has 4-page frames available to it and it uses the random page replacement algorithm?

Select an option to see the answer and solution.

Which of the following counts the number of integers between 1 and N, which are relatively prime to N?

Select an option to see the answer and solution.

Which of the following should be the base case for the recursive solution of a set partition problem?

Options are not available for this question.

Select an option to see the answer and solution.

Hamiltonian path problem is . . . . . . . .

Select an option to see the answer and solution.

A graph is found to be 2 colorable. What can be said about that graph?

Select an option to see the answer and solution.

What is the multiplicity for the laplacian matrix of the complete bipartite graph for n Eigen value?

Select an option to see the answer and solution.

What is the time complexity of the following code used to find the length of a linked list?
#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,0}, n = 7, 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 will be the cross product of the vectors 2i + 3j + k and 3i + 2j + k?

Select an option to see the answer and solution.

What is the rate of the hamming code of parity bit m=8?

Select an option to see the answer and solution.

Which of the following statement about 0/1 knapsack and fractional knapsack problem is correct?

Select an option to see the answer and solution.

Which ordered board is the highest enumerated board till now?

Select an option to see the answer and solution.

Who along with Samuel Morse developed Morse code?

Select an option to see the answer and solution.

Which of the following is true about encryption in gronsfeld cipher?

Select an option to see the answer and solution.

Quickselect is an example of . . . . . . . .

Select an option to see the answer and solution.

Karger's algorithm always gives a minimum cut for a connected graph.

Select an option to see the answer and solution.

Polybius square is also known by the name of?

Select an option to see the answer and solution.

What is a chromatic index?

Select an option to see the answer and solution.

What will be the output of the following code?
#include <iostream>
#include <string>
using namespace std;
void func1(string input,string output)
{
    if(input.length()==0)
    {
        cout<<output<<",";
        return;
    }
    for(int i=0;i<=output.length();i++)
    func1(input.substr(1),output.substr(0,i) + input[0] + output.substr(i));
}
 
int main()
{
    char str[] = "AB";
 
	func1(str, "");
    return 0;
}

Select an option to see the answer and solution.

An Extended hamming code is also called as . . . . . . . .

Select an option to see the answer and solution.

What will be the ciphered text if the string "HELLO" is given as input to the code of hill cipher with keyword as "DATASTRUCTURE"?

Select an option to see the answer and solution.