연결리스트 스택


연결리스트 스택

#define _CRT_SECURE_NO_WARNINGS #include #include typedef int Element; typedef struct { Element data; Node* link; }Node; Node* top = NULL; void error(const char str[]) { printf("%s\n", str); exit(1); } void init_stak() { top = NULL; } int is_empty() { return top == NULL; } int size() { Node* p; int count = 0; for (p = top; p != NULL; p = p->link) { count++; } return count; } void push(Element e)..


원문링크 : 연결리스트 스택