摘要: public static string ReverseWords(string array){if (string.IsNullOrEmpty(array)){throw new ArgumentException("");}int arrLen = array.Length;char[] strNew = new char[arrLen + 1];  //全部反转 for (int index... 阅读全文
posted @ 2010-09-13 10:47 purplesun 阅读(381) 评论(0) 推荐(1) 编辑
摘要: public static int MaxSubSequSum(int[] arr, ref int intStart, ref int intEnd){int MaxSum = 0;int TmpSum = 0;for (int i = 0, j = 0; j < arr.Length; j++){TmpSum += arr[j];//如果截止到当前位置之和(TmpSum)大于最大子序列和... 阅读全文
posted @ 2010-09-13 10:38 purplesun 阅读(335) 评论(2) 推荐(1) 编辑