Update interpolation_search.c

This commit is contained in:
Akshay Kumar 2018-03-10 23:13:44 +05:30 committed by GitHub
parent ad3b1c37fe
commit df99ef4cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ int main()
// be conducted.
int arr[] = {10, 12, 13, 16, 18, 19, 20, 21, 22, 23,
24, 33, 35, 42, 47};
int n = sizeof(arr)/sizeof(arr[0]);
int n = sizeof(arr)/sizeof(arr[0]); //To get length of an array
int x = 18; // Element to be searched
int index = interpolationSearch(arr, n, x);