Files
exercism/c/binary-search/src/binary_search.h
T
2019-06-26 08:04:32 +00:00

13 lines
355 B
C

#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