[자료구조] max heap
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

[자료구조] max heap에 대한 보고서 자료입니다.

본문내용

t++){
if(heap[first].key[count] != heap[second].key[count])
/* heap의 key값을 하나하나 차례로 비교해서 하나라도 다를 경우 FALSE를 반환한다. */
flag=FALSE;
}
return flag;
}
void copy(char *a, char *b){
int first, second, count;
first = compare(a); /* 현 heap의 name을 결정한다 */
second = compare(b); /* 현 heap의 name을 결정한다 */
heap[second].count = heap[first].count; /* heap의 원소의 갯수를 복사한다. */
for(count=0; count < MAX_ELEMENTS ; count++){
heap[second].key[count] = heap[first].key[count]; /* heap의 key값을 하나하나 차례로 복사한다. */
}
}
hw9.out
[Menu: 1.Insert, 2.Delete, 3.Pre, 4.In, 5.Post, 6.Level, 7.Copy, 8.Equal, 9.Exit]choice? i heap1
Enter the number(s) to be inserted to heap1: 30 50 10 80 5 40 20 100
choice? M
[Menu: 1.Insert, 2.Delete, 3.Pre, 4.In, 5.Post, 6.Level, 7.Copy, 8.Equal, 9.Exit]choice? i heap1
Enter the number(s) to be inserted to heap1: 1
choice? n heap1
30 50 1 80 5 100 10 40 20
choice? c heap1 heap2
choice? n heap2
30 50 1 80 5 100 10 40 20
choice? e heap2 heap1
They are equivalent!
choice? i heap2
Enter the number(s) to be inserted to heap2: 200
choice? e heap1 heap2
They are not equivalent!
choice? d heap1
choice? p heap1
80 50 30 1 5 40 10 20
choice? x
Thanks to you, Using my program. Have a nice Day!

키워드

자료구조,   heap,   max,   ,   구조체
  • 가격1,000
  • 페이지수6페이지
  • 등록일2003.09.28
  • 저작시기2003.09
  • 파일형식한글(hwp)
  • 자료번호#225288
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니