HeapMergeSort
所属分类:数学计算
开发工具:C/C++
文件大小:7KB
下载次数:1
上传日期:2011-01-24 22:30:46
上 传 者:
redredapple
说明: Sorting by Heapsort and Mergesort algorithms.
===================================
Input file:H01dat.txt
----------------------------
包含第一列為n a b
第二列以後為a1 a2 a3 a4 ...... an
n:要排序的輸入資料數。
ai:要排序的資料,以space 或換行隔開,程式要能自行判斷資料輸入到n筆為止。
-------------------------------------Output:使用標準輸出〈即輸出到螢幕〉
-------------------------------------a:若a = 1,使用heapsort;若a = 2,使用mergesort。
b:若b = 1,則顯示排序後的結果〈由小到大〉;
若b = 2 且a = 1,則輸出Heapsort前兩次的過程(包含Heapify 過程);
若b = 2 且a = 2,Megersort 則輸出前五次sort 的過程。
(Sorting by Heapsort and Mergesort algorithms. =================================== Input file: H01dat.txt--------------------------- nab the second column contains the first column after the a1 a2 a3 a4 ...... an n: to the number of input data sorted. ai: to sort the data, separated by space or newline, the program must be able to judge for themselves the information input to the n pen up.------------------------------------- Output: standard output < that is output to the screen> ------------------------------------ a: if a = 1, using the heapsort if a = 2, using mergesort. b: If b = 1, then display the results sorted < steeled> if b = 2 and a = 1, the output Heapsort during the last two (including Heapify process) if a = b = 2 and 2, Megersort sort the output process of the previous five.)
文件列表:
HeapMergeSort\HeapMergeSort\H01dat.txt (16, 2008-10-13)
HeapMergeSort\HeapMergeSort\HeapMergeSort.cpp (3974, 2008-10-12)
HeapMergeSort\HeapMergeSort\HeapMergeSort.exe (18095, 2011-01-24)
HeapMergeSort\HeapMergeSort (0, 2011-01-24)
HeapMergeSort (0, 2011-01-24)
===================================================
Sorting by Heapsort and Mergesort algorithms.
===================================================
---------------------------------------------------
Input file:H01dat.txt
---------------------------------------------------
包含第一列為n a b
第二列以後為a1 a2 a3 a4 ...... an
n:要排序的輸入資料數。
ai:要排序的資料,以space 或換行隔開,程式要能自行判斷資料輸入到n筆為止。
---------------------------------------------------
Output:使用標準輸出〈即輸出到螢幕〉
---------------------------------------------------
a:若a = 1,使用heapsort;若a = 2,使用mergesort。
b:若b = 1,則顯示排序後的結果〈由小到大〉;
若b = 2 且a = 1,則輸出Heapsort前兩次的過程(包含Heapify 過程);
若b = 2 且a = 2,Megersort 則輸出前五次sort 的過程。
近期下载者:
相关文件:
收藏者: