文件名称:WinnerTree
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.67kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
常见的实现方法是使用两个数组,
t[n-1]和e[n],数组e存放所有的参加排序的元素,在完全二叉树中是叶子结点,t[]存放
的是比赛的阶段性胜者的编号,再进行n趟比赛排序结束,时间复杂度是O(n*log2(n)),
其实我觉得也可以只通过一个数组A[2*n-1]也可以实现,只是标号的换算有点复杂而已.
-Common implementation approach is to use two array, t [n-1] and e [n], the array storage of all e sort of take part in the elements, are in complete binary tree in leaf nodes, t [] are stored stage game winner serial number and then sort the end of n times a game, time complexity is O (n* log2 (n)), in fact I think it is only through an array A [2* n-1] can also be implementation, but labeling it a bit complicated conversion.
t[n-1]和e[n],数组e存放所有的参加排序的元素,在完全二叉树中是叶子结点,t[]存放
的是比赛的阶段性胜者的编号,再进行n趟比赛排序结束,时间复杂度是O(n*log2(n)),
其实我觉得也可以只通过一个数组A[2*n-1]也可以实现,只是标号的换算有点复杂而已.
-Common implementation approach is to use two array, t [n-1] and e [n], the array storage of all e sort of take part in the elements, are in complete binary tree in leaf nodes, t [] are stored stage game winner serial number and then sort the end of n times a game, time complexity is O (n* log2 (n)), in fact I think it is only through an array A [2* n-1] can also be implementation, but labeling it a bit complicated conversion.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
WinnerTree.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.