Data Structures and Algorithms MCQs

The memory address of fifth element of an array can be calculated by the formula

A. LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for
the array
B. LOC(Array[5])=Base(Array[5])+(5-lower
bound), where w is the number of words per memory cell
for the array
C.LOC(Array[5])-Base(Array[4])+(5-Upper
bound), where w is the number of words per memory cell
for the array
D. None of above
ANSWER: A

The memory address of fifth element of an array can be calculated by the formula Read More »

State True or False for internal sorting algorithms. i) Internal sorting are applied when the entire collection if data to be sorted is small enough that the sorting can take place within main memory. ii) The time required to read or write is considered to be significant in evaluating the performance of internal sorting.

A. i-True, ii-True
B. i-True, ii-False
C. i-False, ii-True
D. i-False, ii-False

State True or False for internal sorting algorithms. i) Internal sorting are applied when the entire collection if data to be sorted is small enough that the sorting can take place within main memory. ii) The time required to read or write is considered to be significant in evaluating the performance of internal sorting. Read More »

Which of the following is not a limitation of binary search algorithm.

A. must use a sorted array
B. requirement of sorted array is expensive when a lot of insertion and deletions are needed
C. there must be a mechanism to access middle element directly
D. binary search algorithm is not efficient when the data elements more than 1500.
ANSWER: D

Which of the following is not a limitation of binary search algorithm. Read More »

error: Content is protected !!