The average case occurs in the Linear Search Algorithm when: (A) The item to be searched is in some where middle of the Array (B) The item to be searched is not in the array (C) The item to be searched is in the last of the array (D) The item to be searched is either in the last or not in the array

1 Answer

Answer :

(A) The item to be searched is in some where middle of the Array

Related questions

Description : Translation Look-aside Buffer(TLB) is (A) a cache-memory in which item to be searched is compared one-by-one with the keys. (B) a cache-memory in which item to be searched is compared with ... keys. (D) an associative memory in which item to be searched is compared with all the keys simultaneously.

Last Answer : (D) an associative memory in which item to be searched is compared with all the keys simultaneously.

Description : If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance? a) Insertion sort b) Selection sort c) Quick sort d) Merge sort

Last Answer : a) Insertion sort

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : State True or False. i) Binary search is used for searching in a sorted array. ii) The time complexity of binary search is O(logn). A) True, False B) False, True C) False, False D) True, True

Last Answer : D) True, True

Description : Consider f(N) = g(N) + h(N) Where function g is a measure of the cost of getting from the start node to the current node N and h is an estimate of additional cost of getting from the current ... ? (A) A* algorithm (B) AO* algorithm (C) Greedy best first search algorithm (D) Iterative A* algorithm

Last Answer : (C) Greedy best first search algorithm

Description : Consider the following statements: (a) Depth - first search is used to traverse a rooted tree. (b) Pre - order, Post-order and Inorder are used to list the vertices of an ordered rooted tree. (c) Huffman's algorithm is used to find an optimal ... (d) (C) (a) , (b) and (c) (D) (a), (b) , (c) and (d)

Last Answer : (D) (a), (b) , (c) and (d)

Description : Given two sorted list of size 'm' and 'n' respectively. The number of comparison needed in the worst case by the merge sort algorithm will be (A) m x n (B) max (m, n) (C) min (m, n) (D) m + n – 1

Last Answer :  (D) m + n – 1

Description : What is the difference between linear and binary search?

Last Answer : A: Linear search does not require the array to be sorted, whereas, binary search requires that the array be sorted. Linear search checks for the search item in a linear fashion from the beginning cell till the end, ... tell what is control variable in your loop. So if your loop is for(int i = 1; i

Description : In ……………, search start at the beginning of the list and check every element in the list. A) Linear search B) Binary search C) Hash Search D) Binary Tree search

Last Answer : A) Linear search

Description : Find the false statement: (A) The relationship construct known as the weak relationship type was defined by Dey, Storey & Barron (1999). (B) A weak relationship occurs when two ... Ternary, Quaternary and Quintary relationships are shown through a series of application scenario's and vignette's

Last Answer : (C) Conceptual model is not accurate representation of "Universe of interest".

Description : Red-black trees are one of many Search tree schemes that are "balanced” in order to guarantee that basic dynamic-set operations take ............. time in the worst case. (1) O(1) (2) O(log n) (3) O(n) (4) O(n log n)

Last Answer : (2) O(log n) 

Description : The phrases that pop up when you search on Google: Are those the most searched phrases?

Last Answer : answer:Yes. I don’t know. Google does not talk about how their search algorithm works.

Description : How does one remove his/her name from Google search if he/she wishes not to be name searched?

Last Answer : No, you would have to remove every page on the Web that mentions you. It is not possible.

Description : What raids searched suspected Communists' houses without search warrants?

Last Answer : rg

Description : VIRUS stands for a) Very Intelligent Result Until Source b) Very Interchanged Resource Under Search c) Vital Information Resources Under Seize d) Viral Important Record User Searched

Last Answer : c) Vital Information Resources Under Seize

Description : Which of the following search engines offers a popular list of the top 50 most searched keywords? A. Google B. Yahoo C. Bing D. Lycos

Last Answer : D. Lycos

Description : VIRUS stands for 1) Very Important Resource Under Search 2) Virtual Information Resource Under Resize 3) Verify Interchange Result Until Source 4) Very Important Record User Searched

Last Answer : 2) Virtual Information Resource Under Resize

Description : VIRUS stands for 1 Very Important Resource Under Search 2 Virtual Information Resource Under Resize 3 Verify Interchange Result Until Source 4 Very Important Record User Searched

Last Answer : 2 Virtual Information Resource Under Resize

Description : What is the drawback of an array?

Last Answer : A: Its size cannot be changed.

Description : To accept 100 different values into the array we require A) Loop B) If condition C) Function D) Structure

Last Answer : A) Loop

Description : Array is A) Primary data type B) Pointer data type C) Heterogeneous data type D) Homogenous data type

Last Answer : D) Homogenous data type

Description : Float a[15], what is the size of array? A) 17 B) 14 C) 15 D) 16

Last Answer : 16

Description : What type of data is: a=[(1,1),(2,4),(3,9)]? a) Array of tuples b) List of tuples c) Tuples of lists d) Invalid type

Last Answer : b) List of tuples

Description : When an array is passed as a parameter to a function which of the following statements is correct? (A) The function can change values in the original array. (B) The function cannot change values in the original array. (C) Results in compilation error. (D) Results in runtime error.

Last Answer : (A) The function can change values in the original array.

Description : Equivalence partitioning is a .................. method that divides the input domain of a program into classes of data from which test cases can be derived. (A) White-box testing (B) Black-box testing (C) Orthogonal array testing (D) Stress testing

Last Answer : (B) Black-box testing

Description : How many values can be held by an array A(-1,m;1 ,m) ? (A) m (B) m2 (C) m(m+l) (D) m(m+2)

Last Answer : (D) m(m+2) Explanation: Total number of values =m(m+2). Because -1 to m, m+2 values and 1 to m, m values

Description : What does the following declaration mean ? int (*ptr) [10]; (A) ptr is an array of pointers of 10 integers. (B) ptr is a pointer to an array of 10 integers. (C) ptr is an array of 10 integers. (D) none of the above.

Last Answer : (B) ptr is a pointer to an array of 10 integers.

Description : Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage. (A) 560 (B) 565 (C) 570 (D) 575

Last Answer : (A) 560

Description : When an array is passed as parameter to a function, which of the following statements is correct ? (A) The function can change values in the original array. (B) In C, parameters are passed by value, ... . (D) Results in a run time error when the function tries to access the elements in the array.

Last Answer : (A) The function can change values in the original array.

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : Which one of the following array represents a binary max-heap? (A) [26, 13, 17, 14, 11, 9, 15] (B) [26, 15, 14, 17, 11, 9, 13] (C) [26, 15, 17, 14, 11, 9, 13] (D) [26, 15, 13, 14, 11, 9, 17]

Last Answer : (C) [26, 15, 17, 14, 11, 9, 13]

Description : Which of the following is true for computation time in insertion, deletion and finding maximum and minimum element in a sorted array? (1) Insertion-O(1), Deletion-O(1), Maximum-O(1), Minimum-O(1) (2) Insertion-O(1), ... (1), Minimum-O(1) (4) Insertion-O(n), Deletion-O(n), Maximum-O(n), Minimum-O(n)

Last Answer : Answer: 3

Description : Which of the following cannot be passed to a function in C++? (1) Constant (2) Structure (3) Array (4) Header file

Last Answer : Answer: 4

Description : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Last Answer : Which of the following algorithm design technique is used in the quick sort algorithm? a) Dynamic programming b) Backtracking c) Divide-and-conquer d) Greedy method

Description : Which of the following sorting algorithm has the running time that is least dependant on the initial ordering of the input? a) Insertion sort b) Quick sort c) Merge sort d) Selection sort

Last Answer : d) Selection sort

Description : Which of the following sorting algorithm is in-place a) Counting sort b) Radix sort c) Bucket sort d) None

Last Answer : b) Radix sort

Description : Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general? a) Insertion sort b) Selection sort c) Heap sort d) None

Last Answer : b) Selection sort

Description : Which of the following algorithm pays the least attention to the ordering of the elements in the input list? a) Insertion sort b) Selection sort c) Quick sort d) None

Last Answer : b) Selection sort

Description : Which of the following is not an in-place sorting algorithm? a) Selection sort b) Heap sort c) Quick sort d) Merge sort

Last Answer : merge sort

Description : Which of the following is a stable sorting algorithm? a) Merge sort b) Typical in-place quick sort c) Heap sort d) Selection sort

Last Answer : a) Merge sort

Description : Which of the following is not a stable sorting algorithm? a) Insertion sort b) Selection sort c) Bubble sort d) Merge sort

Last Answer : b) Selection sort

Description : In RSA algorithm,if p=5,q=7,e=7and message=3. What will be the value of ciphertext ?

Last Answer : 17

Description : For every context free grammar (G) there exists an algorithm that passes any w ∈ L(G) in number of steps proportional to (A) ln|w| (B) |w| (C) |w|2 (D) |w|3

Last Answer : (D) |w|3

Description : Bresenham line drawing algorithm is attractive because it uses (A) Real arithmetic only (B) Integer arithmetic only (C) Floating point arithmetic (D) Real and integer arithmetic

Last Answer : (B) Integer arithmetic only

Description : A virtual memory based memory management algorithm partially swaps out a process. This is an example of (A) short term scheduling (B) long term scheduling (C) medium term scheduling (D) mutual exclusion

Last Answer : (C) medium term scheduling

Description : Using data p=3, q=11, n=pq, d=7 in RSA algorithm find the cipher text of the given plain text SUZANNE (A) BUTAEEZ (B) SUZANNE (C) XYZABCD (D) ABCDXYZ

Last Answer : (A) BUTAEEZ

Description : If h* represents an estimate of the cost of getting from the current node N to the goal node and h represents actual cost of getting from current node to the goal node, then A* algorithm gives an optimal solution ... h* us equal to h (B) h* overestimates h (C) h* underestimates h (D) none of these

Last Answer : (C) h* underestimates h

Description : Which of the following statements is not true about disk-arm scheduling algorithms ? (A) SSTF (shortest seek time first) algorithm increases performance of FCFS. (B) The number of requests for disk ... arm movements. (D) SCAN and C-SCAN algorithms are less likely to have a starvation problem.

Last Answer : (B) The number of requests for disk service are not influenced by file allocation method.

Description : How many distinct stages are there in DES algorithm, which is parameterized by a 56-bit key ? (A) 16 (B) 17 (C) 18 (D) 19

Last Answer : (D) 19