Skip to content

Commit

Permalink
Comment removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ale8k committed Dec 9, 2021
1 parent 2b2969c commit 191ee1c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions slice_searching/interpolation_search/interpolation_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,8 @@ func InterpolationSearch(param int, slice []int) int {
return -1
}

// ((Hi - Lo)/(slice[Hi] -slice[Lo] ))*(X-slice[Lo])
mid = low + ((high-low)/(slice[high]-slice[low]))*(param-slice[low])

// where −
// A = list
// Lo = Lowest index of the list
// Hi = Highest index of the list
// A[n] = Value stored at index n in the list

if slice[mid] == param {
return mid
} else {
Expand Down

0 comments on commit 191ee1c

Please sign in to comment.