2005-08-20から1日間の記事一覧

はじめての C

「二分木 続き 8」 int avl_insert(struct Avl **tree, struct Avl *new_item) { /* empty tree */ if (*tree == NULL) { *tree = new_item; return 1; } if (compare((*tree)->data, new_item->data) > 0) { /* Move left */ if ((*tree)->left != NULL) { …