자료구조 4장 연결리스트
- 최초 등록일
- 2013.08.10
- 최종 저작일
- 2012.01
- 3페이지/ 한컴오피스
- 가격 1,000원
목차
없음
본문내용
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
typedef struct _Node
{
int num;
struct _Node * next;
} node;
node *head = NULL;
node *tail = NULL;
void InitList()
{
head = (node*)malloc(sizeof(node));
tail = (node*)malloc(sizeof(node));
head->next = tail->next = tail;
}
node *search_node(int inNum)
{
node *s = NULL;
node *pre_node = NULL;
pre_node = head;
s = head->next;
while( s->num < inNum && s != tail){
pre_node = pre_node->next;
s = pre_node->next;
}
return pre_node;
}
int node_Count()
참고 자료
없음