文件名称:23456787654321
介绍说明--下载内容均来自于网络,请自行研究使用
问题一:设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