登录
首页 » 算法 » 从头和尾同时进行冒泡排序

从头和尾同时进行冒泡排序

于 2022-01-25 发布 文件大小:1.15 kB
0 50
下载积分: 2 下载次数: 1

代码说明:

从头和尾同时进行冒泡排序-Do bubble sort from the head and from the tail at the same time

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • voc release3.1 windows 版本
    VOC-release3.1windows版本  (行人检测使用变形部件为基础的模式)  下win32bit编译,matlab2013a版本
    2022-06-14 15:17:59下载
    积分:1
  • 蚁群
    实现了蚁群算法,程序精炼,结果正确,代码可直接引用,对于致力于基础算法研究的,有重要意义,参考价值较高。
    2022-03-11 16:17:52下载
    积分:1
  • 蚁群解决TSP旅游商问题
    function [R_best,L_best,L_ave,Shortest_Route,Shortest_Length]=ACATSP(C,NC_max,m,Alpha,Beta,Rho,Q)%%-------------------------------------------------------------------------%% 主要符号说明%% C n个城市的坐标,n×2的矩阵%% NC_max 最大迭代次数%% m 蚂蚁个数%% Alpha 表征信息素重要程度的参数%% Beta 表征启发式因子重要程度的参数%% Rho 信息素蒸发系数%% Q 信息素增加强度系数%% R_best 各代最佳路线%% L_best 各代最佳路线的长度%%========================================================================= %%第一步:变量初始化n=size(C,1);%n表示问题的规模(城市个数)D=zeros(n,n);%D表示完全图的赋权邻接矩阵for i=1:nfor j=1:nif i~=jD(i,j)=((C(i,1)-C(j,1))^2+(C(i,2)-C(j,2))^2)^0.5;elseD(i,j)=eps;      %i=j时不计算,应该为0,但后面的启发因子要取倒数,用eps(浮点相对精度)表示endD(j,i)=D(i,j);   %对称矩阵endend%{1.C就是城市坐标             x         y城市1    0
    2022-08-25 13:59:52下载
    积分:1
  • 下棋的例子
    象棋是一个两个球员战略 棋盘游戏 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2022-02-15 07:47:41下载
    积分:1
  • 鼹鼠闯迷宫
    资源描述void creatWay(int (*mg)[N],int x, int y)//在迷宫中产生一条路,使用图的深度遍历思想来实现, { static int dir[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};////将要走的4个方向保存在二维数组中 int zx = x*2; int zy = y*2; int next, turn, i; mg[zx][zy] = 0; if(rand()%2) turn = 1; else turn = 3; for(i=0,next=rand()%4;i
    2022-01-26 05:46:58下载
    积分:1
  • MMSE 信道估计分析均衡 ofdm 信道容量分析
    这是真正好的代码的 MMSE 信道估计你可以享受的 ofdm 信道容量分析,这是比别人更好的信道估计技术
    2023-08-15 04:00:03下载
    积分:1
  • mime64是什么:mime64是一rfc1341 MIME base64编码描述为其铺…
    WHAT MIME64 IS: MIME64 is an encoding described in RFC1341 as MIME base64.Its purpose is to encode binary files into ASCII so that they may be passedthrough e-mail gates. In this regard, MIME64 is similar to UUENCODE.Although most binaries these days are transmitted using UUENCODE, Ihave seen a few using MIME64, and I have had requests from friends thatI decode MIME64 files that have fallen into their hands. As long assome MIME64 continues to exist, a package such as this one is usefulto have.
    2022-03-22 13:30:49下载
    积分:1
  • Shortest Path
    资源描述Write a program to find the weighted shortest distances from any vertex to a given source vertex in a digraph. If there is more than one minimum path from v to w, a path with the fewest number of edges is chosen. It is guaranteed that all the weights are positive and such a path is unique for any vertex.
    2022-08-26 06:49:00下载
    积分:1
  • this program highlights the pointer to pointer and enum concepts of c
    this program highlights the pointer to pointer and enum concepts of c
    2022-06-15 05:57:25下载
    积分:1
  • 图像特征提取以及匹配,sift代码。可用于图片检索中,同比SURF,其可以较好的识别图像中文字...
    图像特征提取以及匹配,sift代码。可用于图片检索中,同比SURF,其算法可以较好的识别图像中文字-Image feature extraction and matching, sift the code. Can be used for image retrieval, up by SURF, the algorithm can better identify the image text
    2022-06-28 08:28:32下载
    积分:1
  • 696524资源总数
  • 103896会员总数
  • 68今日下载