文件名称:pai-xu
介绍说明--下载内容均来自于网络,请自行研究使用
顺序表的结构没有给出,作为演示分治法这里从简顺序表取一整形数组数组大小由用户定义,数据随机生成。我们知道如果数组大小为 1 则可以直接给出结果,如果大小为 2则一次比较即可得出结果,于是我们找到求解该问题的子问题即: 数组大小 <= 2。到此我们就可以进行分治运算了,只要求解的问题数组长度比 2 大就继续分治,否则求解子问题的解并更新全局解以下是代码-e order of the table structure did not give a simple order form as a presentation divide and conquer method to take an integer array array size defined by the user, data is randomly generated. We know that if the array size is 1, you can directly give the results of size of 2, a comparative to the outcome, so we find the sub-problem of solving this problem: the array size <= 2. This is where we can divide and conquer operation, as long as the length of the array of problem solving than the two large, continue to divide and conquer, or to solve the subproblem solution and update the global solution of the following is the code
(系统自动生成,下载前可以参看下载内容)
下载文件列表
pai xu.txt