c로 쓴 자료구조론 연습문제 6장(그래프)

 1  c로 쓴 자료구조론 연습문제 6장(그래프)-1
 2  c로 쓴 자료구조론 연습문제 6장(그래프)-2
 3  c로 쓴 자료구조론 연습문제 6장(그래프)-3
 4  c로 쓴 자료구조론 연습문제 6장(그래프)-4
 5  c로 쓴 자료구조론 연습문제 6장(그래프)-5
 6  c로 쓴 자료구조론 연습문제 6장(그래프)-6
 7  c로 쓴 자료구조론 연습문제 6장(그래프)-7
 8  c로 쓴 자료구조론 연습문제 6장(그래프)-8
 9  c로 쓴 자료구조론 연습문제 6장(그래프)-9
 10  c로 쓴 자료구조론 연습문제 6장(그래프)-10
 11  c로 쓴 자료구조론 연습문제 6장(그래프)-11
 12  c로 쓴 자료구조론 연습문제 6장(그래프)-12
 13  c로 쓴 자료구조론 연습문제 6장(그래프)-13
 14  c로 쓴 자료구조론 연습문제 6장(그래프)-14
 15  c로 쓴 자료구조론 연습문제 6장(그래프)-15
 16  c로 쓴 자료구조론 연습문제 6장(그래프)-16
 17  c로 쓴 자료구조론 연습문제 6장(그래프)-17
 18  c로 쓴 자료구조론 연습문제 6장(그래프)-18
 19  c로 쓴 자료구조론 연습문제 6장(그래프)-19
 20  c로 쓴 자료구조론 연습문제 6장(그래프)-20
※ 미리보기 이미지는 최대 20페이지까지만 지원합니다.
  • 분야
  • 등록일
  • 페이지/형식
  • 구매가격
  • 적립금
다운로드  네이버 로그인
소개글
c로 쓴 자료구조론 연습문제 6장(그래프)에 대한 자료입니다.
본문내용
다음 사항을 위한 C함수를 작성하라.
(a) 무방향 그래프를 위한 정점의 수와 간선들을 하나씩 읽어들인다.
(b) 그래프를 위한 연결 인접 리스트를 만든다. (두 번 입력되는 간선은 없다고 가정)
(c) 생성된 인접리스트를 이용하여 역 인접 리스트를 생성하라.
(d) 인접 리스트와 역 인접 리스트를 인쇄하는 함수를 작성하라.

#include
#include /*for malloc(), exit()*/

#define MAX_VERTICES 50 /*maximum size of vertex*/
#define IS_FULL(ptr) (!(ptr)) /*determine available memory*/

/*node struct prototype*/
typedef struct node *node_pointer;
struct node {
int vertex;
node_pointer link;
}node;
/*구조체 리스트 배열*/
node_pointer graph[MAX_VERTICES];
node_pointer inverse_graph[MAX_VERTICES];
int vertices; /*정점의 수*/

void read_graph(node_pointer *headnode); /*input from user*/
int insert_graph(node_pointer *headnode, int vertex1, int vertex2); /*make list*/
void inverse_adjacency_lists(int vertices); /*create inverse adjacency lists*/
void print_graph(node_pointer *graph); /*print lists*/

void free_memory(node_pointer *ptr); /*memory해제 함수*/

int main() {
하고 싶은 말
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ

c로 쓴 자료구조론

<이석호 저>
<교보문고>

연습문제 6장 풀이입니다.

ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ