Top 350+ Solved Data Structures (DS) MCQ Questions Answer
Q. What is the hash function used in multiplication method?
a. h(k) = floor( m(kA mod 1))
b. h(k) = ceil( m(kA mod 1))
c. h(k) = floor(kA mod m)
d. h(k) = ceil( kA mod m)
Q. What is the advantage of the multiplication method?
a. only 2 steps are involved
b. using constant
c. value of m not critical
d. simple multiplication
Q. What is the table size when the value of p is 7 in multiplication method of creating hash functions?
a. 14
b. 128
c. 49
d. 127
Q. What is the average retrieval time when n keys hash to the same slot?
a. Theta(n)
b. Theta(n2)
c. Theta(nlog n)
d. Big-Oh(n2)
Q. A ___________refers to a single unit of values.
a. data value.
b. attribute value.
c. data item.
d. elementary.
Q. Data items that are divided into subitems are called ___________.
a. single items.
b. group items.
c. elementary items.
d. entity items.
Q. Which of these best describes an array?
a. A data structure that shows a hierarchical behavior
b. Container of objects of similar types
c. Container of objects of mixed types
d. All of the mentioned
Q. In _______________all the records contain the same data items with the same amount of space.
a. variable-length records.
b. fixed-length records.
c. subscripted variable.
d. superscripted variable.
Q. The logical or mathematical model of a particular organization of data is called a _______________.
a. data structure.
b. algorithms.
c. structure.
d. logic structure.
Q. Arrays are best data structures for _____________________________.
a. relatively permanent collections of dat
b. the size of the structure and the data in the structure are constantly changing.
c. both of above situation.
d. None of the above.
Q. How do the nested calls of the function get managed?
a. Through Queues.
b. Through Stacks.
c. Through Trees.
d. Through Graphs.
Q. __________is combining the records in two different sorted files in to a single sorted file.
a. Sorting.
b. Searching.
c. Listing.
d. Merging.
Q. In linear search algorithm the Worst case occurs when ____________.
a. The item is somewhere in the middle of the array.
b. The item is not in the array at all.
c. The item is the last element in the array.
d. The item is the last element in the array or is not there at all.
Q. The complexity of Binary search algorithm is ____________.
a. O(n).
b. O(log n ).
c. O(n2).
d. O(n log n).