연결리스트ADT (1) 썸네일형 리스트형 자료구조/C) 연결리스트 ADT #include #include #include typedef struct node { char item; struct node *next; struct node *prev; } Node; typedef struct list { Node *head; Node *tail; int n; }List; typedef List *Plist; void initList(Plist list){ list->head = NULL; list->tail = NULL; list->n = 0; printf("initlist success\n"); } Node* newNode(char item) { Node *node = (Node*)malloc(sizeof(Node)); node->item = item; node->prev = .. 이전 1 다음