29 {
30 if (n < 1) {
31 *dest_lower_bound = *dest_upper_bound = -1;
32 return;
33 }
34 if (k < array[0].key) {
35 *dest_lower_bound = *dest_upper_bound = 0;
36 return;
37 }
38
39 for (int i = 0; i < n - 1; ++i) {
42
43 if (curr.
key <= k && k <= next.
key) {
44 *dest_lower_bound = i;
45 *dest_upper_bound = i+1;
46 return;
47 }
48 }
49 *dest_lower_bound = n - 1;
50 *dest_upper_bound = n - 1;
51}