2011年5月30日
摘要: 该算法参考的严蔚敏老师97版 C语言版的快排算法(没有做枢轴的优化),使用了递归调用的方式。代码经调试运行无误(控制台程序)。 1 Dim arr 2 Dim low 3 Dim high 4 arr = Array(1,99,58.32,8,7,3,4.18,2,6,14,65,9,23,43,78,9) 5 6 low = Lbound(arr) 7 high = Ubound(arr) 8 9 '===调用快速排序===10 QuickSort arr,low,high 11 12 For i = 0 to Ubound(arr)13 Response.Write(arr(i)& 阅读全文
posted @ 2011-05-30 13:13 香椿炒鸡蛋 阅读(593) 评论(0) 推荐(0) 编辑
  2011年5月26日
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Collections; 6 7 namespace DataStructure 8 { 9 class Client10 {11 //算法要求:求得所有包含在串s中而不包含在串t中的字符(s中重复的字符只选一个)12 //构成的新串r,以及r中每个字符在s中第一次出现的位置13 14 /// <summary>15 /// 主方法16 /// </summar 阅读全文
posted @ 2011-05-26 11:39 香椿炒鸡蛋 阅读(2126) 评论(0) 推荐(0) 编辑