To sort many large object or structures, it would be most efficient to
A. | Place reference to them in and array an sort the array |
B. | Place them in a linked list and sort the linked list |
C. | Place pointers to them in an array and sort the array |
D. | Place them in an array and sort the array |
Option: B Explanation :
So, the answer is 'B'
Click on Discuss to view users comments. |
A matrix "a" is called lower triangular if and only if for all j > ai j = 0. If such a matrix is to be sorted in a one dimensional array, A then ai j could be mapped to which of the following index of A ?
A. | 1/2 * i (i + 1) j |
B. | i + j |
C. | i (i + 1) + j |
D. | none of these |
Option: A Explanation : Click on Discuss to view users comments. |
Average successful search time for sequential search on 'n' items is
A. | n/2 |
B. | (n-1)/2 |
C. | (n+1)/2 |
D. | None of these |
Option: C Explanation :
If search key matches the very first item, with one comparison we can terminate. If it is second, two comparisons, etc.
Average =[ n (n + 1) ] / 2
Click on Discuss to view users comments. |
The average search time of hashing, with linear probing will be less if the load factor
A. | Is far less than one |
B. | equals one |
C. | is far greater than one |
D. | none of these |
Option: A Explanation : Load factor is the ratio of number of records that are currently present and the total number of records that can be present. If the load factor is less, free space will be more. This means probability of collision is less. So, search time will be less. Click on Discuss to view users comments. |