|
#include <stdio.h>
#include <malloc.h>
#define MAX_VERTICES 50
#define true 1
#define false 0
//GraphType
typedef struct GraphType *Graph_ptr;
typedef struct GraphType{
int vertex;
Graph_ptr link;
}GraphType;
Graph_ptr g_root;
typedef struct LinkType *Link_ptr;
typed
|
- 페이지 8페이지
- 가격 1,500원
- 등록일 2011.06.25
- 파일종류 기타
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
/*********************************************************/
/* Graph 및 Queue class 정의 */
/*********************************************************/
#include <iostream>
using namespace std;
/* Node class */
template <class T>
class Node
{
|
- 페이지 3페이지
- 가격 1,300원
- 등록일 2012.06.07
- 파일종류 압축파일
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
BFS.CPP
#include<iostream.h>
#include<conio.h>
template<class T> class graph;
template<class T>
class queue {
T *qu;
int maxsize;
int rear, front;
public :
queue(int n);
~queue() {delete[] qu;}
void in
|
- 페이지 30페이지
- 가격 4,000원
- 등록일 2013.09.21
- 파일종류 압축파일
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
item;
}
/*그래프를 출력하는 함수*/
void print_graph(node_pointer *graph) {
int i;
node_pointer ptr;
for(i = 0; i<vertices; i++) {
ptr = graph[i];
printf("Head[%d] : ", i);
for(;ptr;ptr = ptr->link) {
if(!(ptr->vertex == -1)) {
printf("%4d", ptr->vertex);
}
}
printf("\n");
}
}
|
- 페이지 56페이지
- 가격 3,000원
- 등록일 2011.11.09
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
Graph)
(4) 이진 트리의 순회 : 전위(Preorder) 순회, 후위(Postorder) 순회, 주위(Inorder) 순회
(5) 그래프의 순회
- 깊이 우선 탐색(DFS; Depth First Search)
스택을 사용하며, 전위 순회 트리 탐색과 유사하다.
- 너비 우선 탐색(BFS; Breadth First Search)
큐(que
|
- 페이지 12페이지
- 가격 3,000원
- 등록일 2012.03.13
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|