MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / find_min

Function find_min

tests/unit/test_heap.c:18–31  ·  view source on GitHub ↗

find min value in array

Source from the content-addressed store, hash-verified

16
17// find min value in array
18static int find_min
19(
20 int *arr
21) {
22 int min = arr[0];
23 int n = array_len(arr);
24 for(int i = 1; i < n; i++) {
25 if(min > arr[i]) {
26 min = arr[i];
27 }
28 }
29
30 return min;
31}
32
33// remove value 'v' from array
34static void remove_value

Callers 1

test_heapFuzzFunction · 0.85

Calls 1

array_lenFunction · 0.85

Tested by

no test coverage detected