摘要:
1. 最大子序列和问题int MaxSubsquenceSum(const int A[],int N){ int ThisSum,MaxSum,j; ThisSum = MaxSum = 0; for(j=0;j<N;j++){ ThisSum += A[j]; if(ThisSum > MaxSum) MaxSum = ThisSum; else if(ThisSum < 0) ThisSum = 0; } return MaxSum;}2. 二分查找法int BinarySearch(const ElementType A[], ElementType X, int N 阅读全文