codex
Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1#include <stdbool.h>
2
3bool 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
12bool 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}
static const struct board b
Definition chess0.c:57
#define x
Definition gcc14.c:1
Definition mult_inh.c:26
bool lsearch(const int *b, const int *e, int x)
Definition utils.h:12
bool is_sorted(const int *b, const int *e)
Definition utils.h:3