文件名称:23456787654321
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:9.09kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
问题一:设a[0:n-1]是已排好序的数组。请改写二分搜索算法,使得当搜索元素x不在数组中时,返回小于x的最大元素位置i和大于x的最小元素位置j,当搜索元素在数组中时,i和j相同,均为x在数组中的位置。
问题二:采用分治策略实现对n个元素进行排序的合并排序算法,其基本思想是:将待排序元素分成大小大致相同的2个子集合,分别对2个子集合进行排序,最终将排好序的子集合合并成为所要求的排好序的集合。
问题三:给定n个矩阵{A1,A2,A3,……,An},其中,Ai与Ai+1是可乘的,i=1,2,…,n-1。要求用动态规划解矩阵连乘积的最优计算次序问题。
该三题的算法设计思想及源码,调试结果-Question one: Let a [0: n-1] is already sorted array. Please rewrite the binary search algorithm so that when the search element of x is not an array, the return is less than x, is larger than the largest element in position i and position x, the smallest element of j, when the search elements in the array when, i and j the same, both x in the array position.
Problem 2: The strategy for achieving the partition of n elements to sort of merge sort algorithm, whose basic idea is: sort elements are to be divided into roughly the same size of the two sub-sets, respectively, of the two sub-sort the collection will eventually sorted The merged to form the required subset sorted collection.
Question 3: Given n matrices (A1, A2, A3, ... ..., An), where, Ai and Ai+1 is a mere a, i = 1,2, ..., n-1. Required to use dynamic programming solution matrix with the optimal product sequence calculation of the problem.
The three questions of the algorithm design ideas and source code, debu
问题二:采用分治策略实现对n个元素进行排序的合并排序算法,其基本思想是:将待排序元素分成大小大致相同的2个子集合,分别对2个子集合进行排序,最终将排好序的子集合合并成为所要求的排好序的集合。
问题三:给定n个矩阵{A1,A2,A3,……,An},其中,Ai与Ai+1是可乘的,i=1,2,…,n-1。要求用动态规划解矩阵连乘积的最优计算次序问题。
该三题的算法设计思想及源码,调试结果-Question one: Let a [0: n-1] is already sorted array. Please rewrite the binary search algorithm so that when the search element of x is not an array, the return is less than x, is larger than the largest element in position i and position x, the smallest element of j, when the search elements in the array when, i and j the same, both x in the array position.
Problem 2: The strategy for achieving the partition of n elements to sort of merge sort algorithm, whose basic idea is: sort elements are to be divided into roughly the same size of the two sub-sets, respectively, of the two sub-sort the collection will eventually sorted The merged to form the required subset sorted collection.
Question 3: Given n matrices (A1, A2, A3, ... ..., An), where, Ai and Ai+1 is a mere a, i = 1,2, ..., n-1. Required to use dynamic programming solution matrix with the optimal product sequence calculation of the problem.
The three questions of the algorithm design ideas and source code, debu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
12345678765432.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.