codex
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1
#include <stdbool.h>
2
3
bool
is_sorted
(
const
int
*
b
,
const
int
*e) {
4
if
(
b
== e)
5
return
true
;
6
while
(++
b
!= e)
7
if
(!(
b
[-1] <
b
[0]))
8
return
false
;
9
return
true
;
10
}
11
12
bool
lsearch
(
const
int
*
b
,
const
int
*e,
int
x
) {
13
for
(;
b
!= e; ++
b
)
14
if
(*
b
==
x
)
15
return
true
;
16
return
false
;
17
}
b
static const struct board b
Definition
chess0.c:57
x
#define x
Definition
gcc14.c:1
b
Definition
mult_inh.c:26
lsearch
bool lsearch(const int *b, const int *e, int x)
Definition
utils.h:12
is_sorted
bool is_sorted(const int *b, const int *e)
Definition
utils.h:3
tex
algo
fundamentals
utils.h
Generated by
1.11.0