You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
414 B

#ifndef _SPLAY_TREE_H_
#define _SPLAY_TREE_H_
typedef struct tree_node {
struct tree_node * left, * right;
int key;
int size; /* maintained to be the number of nodes rooted here */
void *data;
} splay_tree;
splay_tree * splaytree_splay (splay_tree *t, int key);
splay_tree * splaytree_insert(splay_tree *t, int key, void *data);
splay_tree * splaytree_delete(splay_tree *t, int key);