81. What is the following expression, lcm (a, gcd (a, b)) equal to?
82. What will be time complexity when binary search is applied on a linked list?
83. Which happens if the fast-moving pointer(hare) reaches the tail of the linked list?
84. In a bipartite graph G=(V,U,E), the matching of a free vertex in V to a free vertex in U is called?
85. Morse Code is named after which scientist?
86. Which one of the following is not an application of max-flow min-cut algorithm?
87. What is the worst case time complexity of dynamic programming solution of set partition problem(sum=sum of set elements)?
88. Which of the following refers to the minimum number of colors, with which the edges of the graph can be colored?
89. Is Coppersmith-Winograd algorithm better than Strassen's algorithm in terms of time complexity?
90. What will be the output for the following code?
#include <stdio.h>
bool func(int arr[], int n, int sum)
{
bool subarr[n+1][sum+1];
for (int i = 0; i <= n; i++)
subarr[i][0] = true;
for (int i = 1; i <= sum; i++)
subarr[0][i] = false;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= sum; j++)
{
if(j<arr[i-1])
subarr[i][j] = subarr[i-1][j];
if (j >= arr[i-1])
subarr[i][j] = subarr[i-1][j] ||
subarr[i - 1][j-arr[i-1]];
}
}
return subarr[n][sum];
}
int main()
{
int arr[] = {3, 3, 4, 4, 7};
int sum = 5;
int n = sizeof(arr)/sizeof(arr[0]);
if (func(arr, n, sum) == true)
printf("true");
else
printf("false");
return 0;
}
#include <stdio.h>
bool func(int arr[], int n, int sum)
{
bool subarr[n+1][sum+1];
for (int i = 0; i <= n; i++)
subarr[i][0] = true;
for (int i = 1; i <= sum; i++)
subarr[0][i] = false;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= sum; j++)
{
if(j<arr[i-1])
subarr[i][j] = subarr[i-1][j];
if (j >= arr[i-1])
subarr[i][j] = subarr[i-1][j] ||
subarr[i - 1][j-arr[i-1]];
}
}
return subarr[n][sum];
}
int main()
{
int arr[] = {3, 3, 4, 4, 7};
int sum = 5;
int n = sizeof(arr)/sizeof(arr[0]);
if (func(arr, n, sum) == true)
printf("true");
else
printf("false");
return 0;
}
Read More Section(Miscellaneous on Data Structures)
Each Section contains maximum 100 MCQs question on Miscellaneous on Data Structures. To get more questions visit other sections.
- Miscellaneous on Data Structures - Section 1
- Miscellaneous on Data Structures - Section 2
- Miscellaneous on Data Structures - Section 3
- Miscellaneous on Data Structures - Section 4
- Miscellaneous on Data Structures - Section 5
- Miscellaneous on Data Structures - Section 6
- Miscellaneous on Data Structures - Section 8
- Miscellaneous on Data Structures - Section 9
- Miscellaneous on Data Structures - Section 10
- Miscellaneous on Data Structures - Section 11
- Miscellaneous on Data Structures - Section 12