|
Insert to Heap
- Delete Heap's root
- traversals ( Pre, In, Post, Level )
- Copy Heap
- Test Equal Heap
Program has limitations
- Max Order size is 255
- Max Heap sizs is 200
- can access just two Heaps ( name : heap1, heap2 )
******************************************
|
- 페이지 19페이지
- 가격 2,000원
- 등록일 2007.05.14
- 파일종류 압축파일
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
heapsort (n); //n개의 데이터에 대한 heapsort함수 호출
if(n>=500) //데이터의 크기가 500보다 클때 앞뒤로 30개씩 출력한다.
{
for(i = 1 ; i <= 30 ; i++)
{
if(i % 5 == 0) printf(\"%10.4f \\n\", list[i]); //출력할때 줄을 맞추기 위해서
//\"%10.4f \"를 썼다.
else
{
printf
|
- 페이지 9페이지
- 가격 2,000원
- 등록일 2004.10.05
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#define TRUE 1
#define FALSE 0
#define max_heapsize 200
typedef struct heap {
int data[max_heapsize];
int size;
} heap;
int init_heap(heap *);
int insert_heap(heap *,
|
- 페이지 1페이지
- 가격 1,300원
- 등록일 2012.11.13
- 파일종류 기타
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
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,
|
- 페이지 6페이지
- 가격 1,000원
- 등록일 2003.09.28
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
;
for(i=1; i<=6 ; i++) {
printf(\"%d번째 값: %d\\n\",i,heap1.heap[i]);
}
printf(\"------------------------------\\n\");
printf(\"우선순위가 높은 값 부터 출력\\n\");
printf(\"%d\\n\",delete_max_heap(&heap1)); //우선순위큐 반환
printf(\"%d\\n\",delete_max_heap(&heap1));
printf(\"%d\\n\",delete_
|
- 페이지 3페이지
- 가격 3,000원
- 등록일 2009.09.25
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|