Done
This commit is contained in:
parent
a04a66c509
commit
add23e123e
23 changed files with 1041 additions and 107 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* ---------------------------------------------------------
|
||||
* Exercise Number: S07
|
||||
* Title: Binary search implementation
|
||||
* Author: */<your name>;/*
|
||||
* Author: Marc Tismonar
|
||||
* ----------------------------------------------------------
|
||||
* Description:
|
||||
* Implements the binary search algorithm
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
* be inserted into the sorted list if it is not included in the list. The insertion position is
|
||||
* expressed as index with negative sign, so that the value can be inserted at index (-1 * result).
|
||||
*/
|
||||
int binary_search_list(<params>);
|
||||
int binary_search_list(IntList haystack, criterion_fn criterion, int needle);
|
||||
|
||||
/**
|
||||
* Searches the given needle within the given haystack up the given length using binary search approach.
|
||||
|
|
@ -46,7 +46,7 @@ int binary_search_list(<params>);
|
|||
* be inserted into the sorted list if it is not included in the list. The insertion position is
|
||||
* expressed as index with negative sign, so that the value can be inserted at index (-1 * result).
|
||||
*/
|
||||
<type> binary_search_list_limited(<params>);
|
||||
int binary_search_list_limited(IntList haystack, int length, criterion_fn criterion, int needle);
|
||||
|
||||
/* ARRAY VARIANT */
|
||||
|
||||
|
|
@ -62,6 +62,6 @@ int binary_search_list(<params>);
|
|||
* be inserted into the sorted list if it is not included in the list. The insertion position is
|
||||
* expressed as index with negative sign, so that the value can be inserted at index (-1 * result).
|
||||
*/
|
||||
<type> binary_search_array(<params>);
|
||||
int binary_search_array(int haystack[], int length, criterion_fn criterion, int needle);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue