CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - heap sort
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - heap sort - List
[
Education soft system
]
StudentInfo
DL : 0
简易学生信息管理系统 程序实现思路: 先创建一个学生元素类,用于存放学生的各种数据。然后创建一个堆(heap)类,把数据以堆的形式存储,可便进行堆排序及各种操作。最后再用一个类(class priQueue)包装了heap类,以方便主函数调用。本程序中比较核心的技术就是用到了堆排序,将学生按优先级(高的排前面,低的排后面)的大小进行有序排列。堆排序的时间复杂度较一般排序(如:冒泡,选择等)来得低,可使程序显示数据时效率更高。-Simple Student Information Management System program ideas: the first element to create a student class, students used to store various data. And then create a stack (heap) type, the data in order to stack the form of storage, can be carried out and various operation HEAPSORT. Finally, re-use a class (class priQueue) type of packaging the heap in order to facilitate the main function call. Comparison of this procedure is the core technology used in the heap sort students by priority (high in front of the row, low row behind) the size of orderly arrangement. HEAPSORT time complexity of a more general sort (eg: bubble, choose, etc.) too low, the procedure can show the data more efficient.
Date
: 2025-12-30
Size
: 133kb
User
:
est
[
Education soft system
]
sort
DL : 0
本实验采用的rand函数产生随机的100个数,通过的建立列表,并调用rand函数产生随机的100个列表元素。但是没选择一种排序就会重新随机产生100数。然后就是对常见的几种数据结构的排序的主函数的的编写,根据已有的函数的代码,很快就能写出常见的折半排序,直接排序,冒泡排序,简单的选择排序,堆排序,希尔排序的主函数,最后编写一个菜单来选择通过调用各种排序的函数来实现相应的功能。-The rand function produces random 100 number used in this experiment, through the establishment of the list, and calling the rand function to generate a random list of 100 elements. But did not select a sort will be re-randomized 100 number. Then sort of several common data structure is the main function of the writing, the basis of the code of the function, will soon be able to write a common binary Sort by direct sequencing of the bubble sort, simple selection sort, heap main function sort of sort, Hill Finally, write a menu to select the corresponding function is achieved by calling the function of various sorting.
Date
: 2025-12-30
Size
: 3kb
User
:
胡德林
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.