Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Implementation of jump search algorithm. More...
#include <assert.h>
#include <math.h>
#include <stdio.h>
Macros | |
#define | min(X, Y) ((X) < (Y) ? (X) : (Y)) |
Macro to return the minimum of two values. | |
Functions | |
int | jump_search (const int *arr, int x, size_t n) |
Implement Jump-search algorithm. More... | |
void | test () |
Test implementation of the function. More... | |
int | main () |
Main function. | |
Implementation of jump search algorithm.
int jump_search | ( | const int * | arr, |
int | x, | ||
size_t | n | ||
) |
Implement Jump-search algorithm.
[in] | arr | Array to search within |
x | value to search for | |
n | length of array |
void test | ( | void | ) |
Test implementation of the function.