Question: algorithm 1)The best case of finding all string matching using nave algorithm is O(m) 2)The sort that divides the problem size according to the items
algorithm 1)The best case of finding all string matching using nave algorithm is O(m) 2)The sort that divides the problem size according to the items value is
3)BF algorithm always gives higher time than the other algorithms
5)The time complexity of the following function is
x = 0
for J = 1 to n
x++
for K = J to 3*n
x = x + K
6)Assume the following code
F(int A[], int n, int item)
int pos=(sqrt(n)+n*n)%n
A[pos]=item
The time complexity for this code is 7)In the binary search tree the worst time complexity of searching about an item is O(n)
8)In quick sort, one of the iterations, the array looks like this: 10 7 9 13 16 15 18 14 20 17. The pivot is 9)The number of comparisons is required in insertion sort to sort an array if it is already sorted is n-1
10)Let array A[] = {20, 22, 33, 36, 38, 49, 50, 61,63, 73, 74, 77, 85, 90, 97} and the search key K =90. In the interpolation search we find the key after
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
