
RB_Tree 1. RB_Tree 초기화 rbtree *new_rbtree(void) { rbtree *p = (rbtree *)malloc(sizeof(rbtree)); if (p == NULL) { perror("Failed to allocate memory for RB tree"); exit(EXIT_FAILURE); } // TODO: initialize struct if needed p->nil = (node_t *)malloc(sizeof(rbtree)); if (p->nil == NULL) { perror("Failed to allocate memory for sentinel node"); exit(EXIT_FAILURE); } p->nil->color = RBTREE_BLACK; p->ro..