Data Structures and Algorithms - Sorting and Searching

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

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

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