calloc에 대해서,,
이번 주차때 rbtree코드를 스스로 짜지 않았다. 알고리즘 책에 있는 의사 코드를 그대로 옮기고 해석하기만 했다.그래서 마지막 날인 오늘 rbtree 코드를 짜면서 신경쓰지 못 했던 부분에 대해 정리하고 이번 주를 마무리하려고 한다. 노드를 calloc으로 할당할 때의 이점?typedef struct node_t { color_t color; key_t key; struct node_t *parent, *left, *right;} node_t;typedef struct { node_t *root; node_t *nil; // for sentinel} rbtree;rbtree 구조체와rbtree의 노드에 해당하는 node_t 구조체가 주어진다.rbtree *new_rbtree(void) { ..