소개글
선택정렬로 내부정렬한 후에 계단식 합병 하였습니다.
주석첨부~
목차
1. 선택정렬로 된 계단식 합병
2. 첫번째 계단식 합병 알고리즘 설명(cascade merge)
3. 두번째 계단식 합병 알고리즘 설명(cascade merge)
본문내용
1. 선택정렬로 된 계단식 합병
#include < iostream.h >
#include < stdio.h >
#include < stdlib.h >
#include < time.h >
#include < conio.h >
#include < string.h >
#include < windows.h >
#define CHECK_TIME_START __int64 freq, start, end; if (QueryPerformanceFrequency((_LARGE_INTEGER*)&freq)) {QueryPerformanceCounter((_LARGE_INTEGER*)&start);
#define CHECK_TIME_END(a,b) QueryPerformanceCounter((_LARGE_INTEGER*)&end); a=(float)((double)(end - start)/freq*1000); b=TRUE; } else b=FALSE;
#define max 1000 //각 파일의 레코드 갯수 설정
#define subfileNum 17 //최대 생성 파일 갯수 설정
bool InputFile1=true;
int first=0;
void CascadeMerge();
void SelectionSort(int a[], int n); //선택정렬 함수 선언
void InternalSort(char *FileName); //내부정렬 함수 선언
void CascadeMerge_First(char *FileName); //계단식 합병 함수 선언
int a[max]; // 숫자를 받을 배열
void Fibo();
int fibo_flag[subfileNum];
int Run1,Run2,Run3,Run4;
float Time;
BOOL err;