aboutsummaryrefslogtreecommitdiff
path: root/strbst.h
blob: 7dbbae1c973bd12bc23d5932d1a2eddae6a3e7cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef __STRBST_H__
#define __STRBST_H__

typedef struct strbstnode {
    char* ind;
    void* data; // as used, always link*
    struct strbstnode* left;
    struct strbstnode* right;
    int ht;
} strbstnode;

typedef struct strbst {
    strbstnode* head;
} strbst;

strbst* newbst(void);

void insbst(strbst* bst, char* ind, void* data);

void* query(strbst* bst, char* ind);

void printbst(strbst* bst);

#endif