4 comment
This commit is contained in:
parent
f5c973dfe7
commit
488a8596b5
@ -2,6 +2,10 @@
|
||||
|
||||
#define SIZE 4096
|
||||
|
||||
// The complexity is O(log n)
|
||||
// because we always half the amount
|
||||
// like N/2 -> N/4 -> N/8 ... N/(2^k) which equals log n
|
||||
|
||||
int binary_search(int array[], int size, int offset, int value)
|
||||
{
|
||||
int pivot = size / 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user