Data Structures and Algorithms - Sorting and Searching

11. A search begins the search with the element that is located in the middle of the array

Cancel reply

Your email address will not be published.


Cancel reply

Your email address will not be published.


12. To sort many large object or structures, it would be most efficient to

  • Option : B
  • Explanation :
    • Dynamic structure (Memory Allocated at run-time).
    • We can have more than one data type.
    • Re-arrange of linked list is easy (Insertion-Deletion).
    • It doesn’t waste memory.

    So, the answer is 'B'

Cancel reply

Your email address will not be published.


Cancel reply

Your email address will not be published.


13. 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 ?

Cancel reply

Your email address will not be published.


Cancel reply

Your email address will not be published.


14. Average successful search time for sequential search on 'n' items is

  • 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
Cancel reply

Your email address will not be published.


Cancel reply

Your email address will not be published.


15. The average search time of hashing, with linear probing, will be less if the load factor

  • Option : A
  • Explanation : The load factor is the ratio of the 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 the probability of collision is less. So, the search time will be less.
Cancel reply

Your email address will not be published.


Cancel reply

Your email address will not be published.