4 comment

This commit is contained in:
NaiJi ✨ 2024-04-22 00:33:21 +04:00
parent f5c973dfe7
commit 488a8596b5
1 changed files with 4 additions and 0 deletions

View File

@ -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;