Best Case Time Complexity for BInary Search Algoritm is
What is the auxiliary space requirement of exponential search when used with iterative binary search?
Which of the following problems can't be solved using recursion?
What is the need for a circular queue?
When is a binary search algorithm best applied?
What is the correct statement when the corresponding end bracket/braces/parentheses are not found?
What sorting network always gives monotonically increasing or decreasing sequences even when the input is monotonically increasing, decreasing or both?
In a balanced binary search tree with n elements, what is the worst case time complexity of reporting all elements in range [a,b] ? Assume that the number of reported elements is k.
If n is the length of the text (t) and m is the length of the pattern (q), identify the correct pre-processing algorithm. (where p is a suitable modulus to reduce the complexity)
q = 0; T0 = 0;
Consider the following C program that attempts to locate an element x in an array Y[] using binary search. The program is erroneous.
1. f(int Y[10], int x) {
2. int i, j, k;
3. i = 0; j = 9;
4. do {
5. k = (i + j) / 2;
6. if (Y[k] < x) i = k + 1; else j = k;
7. } while (Y[k] != x && i < j);
8. if (Y[k] == x) printf("x is in the array");
9. else printf("x is not in the array");
10. }