✨ A1
This commit is contained in:
37
A1/id_query_naive.c
Normal file
37
A1/id_query_naive.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdint.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "record.h"
|
||||
#include "id_query.h"
|
||||
|
||||
struct naive_data {
|
||||
struct record *rs;
|
||||
int n;
|
||||
};
|
||||
|
||||
struct naive_data* mk_naive(struct record* rs, int n) {
|
||||
// TODO
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void free_naive(struct naive_data* data) {
|
||||
// TODO
|
||||
assert(0);
|
||||
}
|
||||
|
||||
const struct record* lookup_naive(struct naive_data *data, int64_t needle) {
|
||||
// TODO
|
||||
assert(0);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return id_query_loop(argc, argv,
|
||||
(mk_index_fn)mk_naive,
|
||||
(free_index_fn)free_naive,
|
||||
(lookup_fn)lookup_naive);
|
||||
}
|
||||
Reference in New Issue
Block a user