You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interpolationSearch always returns -1 even if value is included in an array with duplicates. For instance, if the input is [42,42,42] and the target element is 42, the interpolation search will return -1 although 42 is included in the array.
Versions
NodeJS version (if applicable): 8.10.0
AlgorithmJS version: 0.0.13
Expected behaviour
interpolationSearch should return 0.
Steps to recreate
Input an array with all the same values in interpolationSearch, and a target element which is included in the array.
Description
interpolationSearch always returns -1 even if value is included in an array with duplicates. For instance, if the input is [42,42,42] and the target element is 42, the interpolation search will return -1 although 42 is included in the array.
Versions
Expected behaviour
interpolationSearch should return 0.
Steps to recreate
Input an array with all the same values in interpolationSearch, and a target element which is included in the array.
People to notify
@manrajgrover
The text was updated successfully, but these errors were encountered: