mirror of
https://github.com/dholerobin/Lecture_Notes.git
synced 2025-07-01 13:06:29 +00:00
Update InterpolationSearch.md
This commit is contained in:
parent
3e44828be8
commit
08a5a9a13f
@ -16,9 +16,9 @@ Now, by the equation to find a slope, below formula can be used to find $x$,
|
||||
|
||||
$\Large{\frac{y-y_1}{x-x_1} = \frac{y_2-y_1}{x_2-x_1}}$
|
||||
|
||||
$\therefore \Large{{x-x_1} =\frac{(y-y_1)\times (x_2-x_1)}{y_2-y_1}}$
|
||||
$\Large{{x-x_1} =\frac{(y-y_1)\times (x_2-x_1)}{y_2-y_1}}$
|
||||
|
||||
$\therefore \Large{{x} =x_1 + \frac{(y-y_1)\times (x_2-x_1)}{y_2-y_1}}$
|
||||
$\Large{{x} =x_1 + \frac{(y-y_1)\times (x_2-x_1)}{y_2-y_1}}$
|
||||
|
||||
In order to find a formula for arrays, we need to have some characteristics of data, other than it is sorted. Like, the given data follows linear distribution or exponential distribution or uniform distribution over some range.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user