![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法与结构
meiwn
这个作者很懒,什么都没留下…
展开
-
Asp中的几种常见算法
%Dim B()count1=10ReDim B(count1)For count=0 To count1 Randomize 初始化随机数生成器。 B(count)= Int((1000 * Rnd) + 1) 产生 1 到 6 之间的随机数。 Next输出数组中的元素Function ShowArray(Arr)For Each i In Arrrespo转载 2006-08-30 10:11:00 · 700 阅读 · 0 评论 -
C#算法(二)选择排序
using System;namespace SelectionSorter...{ public class SelectionSorter ...{ private int min; public void Sort(int [] list) ...{ for(int i=0;ilist.Length-1;i++) ...{ min=i; for(int j=转载 2006-08-30 10:14:00 · 623 阅读 · 0 评论 -
C#算法(一)冒泡排序
using System;namespace BubbleSorter...{ public class BubbleSorter ...{ public void Sort(int [] list) ...{ int i,j,temp; bool done=false; j=1; while((jlist.Length)&&(!done)) ...{ done=转载 2006-08-30 10:12:00 · 638 阅读 · 0 评论 -
C#算法(三)插入排序
namespace InsertionSorter...{ public class InsertionSorter ...{ public void Sort(int [] list) ...{ for(int i=1;ilist.Length;i++) ...{ int t=list[i]; int j=i; while((j>0)&&(list[j-1转载 2006-08-30 10:18:00 · 685 阅读 · 0 评论