Skip to content

Commit 175ccbc

Browse files
committed
Added Interpolation Search to README
1 parent a8f367d commit 175ccbc

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,18 @@ __Properties__
120120
* Average case performance O(log n)
121121
* Worst case space complexity O(1)
122122

123+
124+
125+
### Interpolation Search
126+
![alt text][interpolation-image]
127+
128+
From [Wikipedia][interpolation-wiki]: 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.[1] Interpolation search resembles the method by which people search a telephone directory for a name (the key value by which the book's entries are ordered): in each step the algorithm calculates where in the remaining search space the sought item might be, based on the key values at the bounds of the search space and the value of the sought key, usually via a linear interpolation.
129+
130+
__Properties__
131+
* Worst case performance O(n)
132+
* Best case performance O(log log n)
133+
* Average case performance O(n)
134+
123135
----------------------------------------------------------------------------------------------------------------------
124136

125137
## Ciphers
@@ -164,6 +176,12 @@ Mathematically a bijective function is used on the characters' positions to encr
164176
[selection-wiki]: https://en.wikipedia.org/wiki/Selection_sort
165177
[selection-image]: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Selection_sort_animation.gif/250px-Selection_sort_animation.gif "Selection Sort Sort"
166178

179+
180+
[interpolation-wiki]: https://en.wikipedia.org/wiki/Interpolation_search
181+
182+
[interpolation-image]:
183+
https://qph.fs.quoracdn.net/main-qimg-02f1f050de01608b9b1f2f27155d1b17.webp "Interpolation Search"
184+
167185
[shell-toptal]: https://www.toptal.com/developers/sorting-algorithms/shell-sort
168186
[shell-wiki]: https://en.wikipedia.org/wiki/Shellsort
169187
[shell-image]: https://upload.wikimedia.org/wikipedia/commons/d/d8/Sorting_shellsort_anim.gif "Shell Sort"
@@ -175,4 +193,4 @@ Mathematically a bijective function is used on the characters' positions to encr
175193
[binary-image]: https://upload.wikimedia.org/wikipedia/commons/f/f7/Binary_search_into_array.png
176194

177195

178-
[caesar]: https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg
196+
[caesar]: https://upload.wikimedia.org/wikipedia/commons/4/4a/Caesar_cipher_left_shift_of_3.svg

0 commit comments

Comments
 (0)