91. Consider the following algorithm for finding the nth Catalan number using dynamic approach. which of the following steps best fills the blank?
1) create and initialize a variable 'n' and an array 'c'
2) initialize the first two values of array as 1
3) _______________________
4) return c[n]
1) create and initialize a variable 'n' and an array 'c' 2) initialize the first two values of array as 1 3) _______________________ 4) return c[n]
92. In Morse Code, each dot or dash within a character is followed by a period of signal absence. What is the name of that signal?
93. We can solve any recurrence by using Master's theorem.
94. For a hamming code of parity bit m=8, what is the total bits and data bits?
95. A non-deterministic algorithm is said to be non-deterministic polynomial if the time-efficiency of its verification stage is polynomial.
96. In a graph, every maximum matching is a maximal matching.
97. The optimal time obtained through divide and conquer approach using merge sort is the best case efficiency.
98. What is the output of the following code?
#include<stdio.h>
int recursive_binary_search(int *arr, int num, int lo, int hi)
{
if(lo > hi)
return -1;
int mid = (lo + hi)/2;
if(arr[mid] == num)
return mid;
else if(arr[mid] < num)
lo = mid + 1;
else
hi = mid - 1;
return recursive_binary_search(arr, num, lo, hi);
}
int main()
{
int arr[5] = {5,4,3,2,1},num = 1,len = 5;
int indx = recursive_binary_search(arr,num,0,len-1);
printf("Index of %d is %d",num,indx);
return 0;
}
#include<stdio.h>
int recursive_binary_search(int *arr, int num, int lo, int hi)
{
if(lo > hi)
return -1;
int mid = (lo + hi)/2;
if(arr[mid] == num)
return mid;
else if(arr[mid] < num)
lo = mid + 1;
else
hi = mid - 1;
return recursive_binary_search(arr, num, lo, hi);
}
int main()
{
int arr[5] = {5,4,3,2,1},num = 1,len = 5;
int indx = recursive_binary_search(arr,num,0,len-1);
printf("Index of %d is %d",num,indx);
return 0;
}
99. Backtracking algorithm is faster than the brute force technique
100. What does Maximum flow problem involve?
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 4
- Miscellaneous on Data Structures - Section 5
- Miscellaneous on Data Structures - Section 6
- Miscellaneous on Data Structures - Section 7
- 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