트리구조를 이용한 순회 알고리즘
- 최초 등록일
- 2003.04.24
- 최종 저작일
- 2003.04
- 7페이지/ 한컴오피스
- 가격 1,000원
소개글
자료구조시간에 배우는 스택과 전위,중위,후위순회를 트리구조를 이용하여 순회하는 프로그램 소스입니다.
목차
1.실행화면
2.소스
본문내용
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define STACK_SIZE 100 // Maximum size of Stack
typedef struct node *tree_pointer;
typedef struct node {
int data;
tree_pointer left_child;
tree_pointer right_child;
};
int stack_pointer=0; // Valiable for stack pointer
tree_pointer stack[STACK_SIZE]; // Buffer of Stack
tree_pointer head; // Head of Binary Tree
void error(char *msg);
void push_stack(tree_pointer node);
int empty_stack(void);
참고 자료
없음