query naive
This commit is contained in:
BIN
A1/id_query_naive
Executable file
BIN
A1/id_query_naive
Executable file
Binary file not shown.
@ -15,18 +15,19 @@ struct naive_data {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct naive_data* mk_naive(struct record* rs, int n) {
|
struct naive_data* mk_naive(struct record* rs, int n) {
|
||||||
// TODO
|
struct naive_data* data = malloc(sizeof(struct naive_data*));
|
||||||
assert(0);
|
data->rs = rs;
|
||||||
|
data->n = n;
|
||||||
|
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_naive(struct naive_data* data) {
|
void free_naive(struct naive_data* data) {
|
||||||
// TODO
|
free_records(data->rs,data->n);
|
||||||
assert(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct record* lookup_naive(struct naive_data *data, int64_t needle) {
|
const struct record* lookup_naive(struct naive_data *data, int64_t needle) {
|
||||||
// TODO
|
return &data->rs[needle];
|
||||||
assert(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
Reference in New Issue
Block a user