Refactor c/binary_search header

This commit is contained in:
dwrz
2019-06-26 08:04:32 +00:00
parent 708916b4ca
commit e50959488a
+11
View File
@@ -1 +1,12 @@
#ifndef BINARY_SEARCH_H
#define BINARY_SEARCH_H
// binary_search expects:
// val: an integer value to search
// arr[]: an array of *sorted* integers
// len: the length of ARR[]
// If val is found, the function returns a pointer to an array index.
// Otherwise, it returns NULL.
int* binary_search(int val, int arr[], int len);
#endif // BINARY_SEARCH_H