MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
to be able to use interpolation search, we need to get the ____ from the list
A
middle position
B
probing position
C
interval position
D
high and low position
Explanation: 

Detailed explanation-1: -Position Probing in Interpolation Search Initially, the probe position is the position of the middle most item of the collection. If the middle item is greater than the item, then the probe position is again calculated in the sub-array to the right of the middle item.

Detailed explanation-2: -Explanation: For calculating the position after each iteration in interpolation search we use the formula low + ((x – A[low]) * (high – low)) / (A[high] – A[low]). Then the value at the calculated position is compared with the element being searched.

Detailed explanation-3: -Interpolation search is an algorithm for searching for a key in an array that has been ordered by numerical values assigned to the keys (key values). It was first described by W. W. Peterson in 1957.

There is 1 question to complete.