码迷,mamicode.com
首页 >  
搜索关键字:c 冒泡排序 选择排序    ( 6364个结果
codeforces Arrival of the General 题解
相当于一个简单的冒泡排序了,不过不用直接排序,只是计算一下而已。 注意 1 最大值和最小值交换的时候可以减少一次交换的。 2 元素是会重复的。...
分类:其他好文   时间:2014-07-22 23:03:32    阅读次数:343
某支付公司笔试题二
介绍常用的排序方法,采用Java语言实现。...
分类:其他好文   时间:2014-05-03 22:00:56    阅读次数:277
C#冒泡排序
C#冒泡排序,转载自:http://bbs.it-home.org/forum-net-2.html不多解析自己看去吧using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace...
分类:其他好文   时间:2014-05-01 20:17:35    阅读次数:348
算法基础之排序(1)--冒泡排序 改进
1 /********************************************************************************************************** 2 * Function :...
分类:其他好文   时间:2014-05-01 12:23:42    阅读次数:276
基础算法之排序(2)--选择排序
1 /********************************************************************************************************** 2 * Function :...
分类:其他好文   时间:2014-05-01 12:23:06    阅读次数:355
算法基础之排序(2)--选择排序 改进
1 /********************************************************************************************************** 2 * Function : ...
分类:其他好文   时间:2014-05-01 12:12:43    阅读次数:297
冒泡排序法
1 /// 2 /// 冒泡排序法-for循环 3 /// 4 /// 5 private static void BubbleSort(int[] array) 6 { 7 ...
分类:其他好文   时间:2014-05-01 09:19:38    阅读次数:279
七大排序算法(冒泡,选择,插入,希尔,快速,合并,堆排序)的java实现
冒泡排序 思路:就是每次将最大或最小的元素放到数组的最后,so easy!时间复杂度为(O(n^2)) public class BubbleSort { public static void bubbleSort(int[] a) { for (int j = 1; j < a.length; j++) { for (int i = 0; i < a.length - j; i+...
分类:编程语言   时间:2014-04-30 22:12:40    阅读次数:309
排序算法(二)
在上一篇排序算法的文章中介绍了插入排序,分别为直接插入排序和希尔排序。今天我们继续来介绍其他的排序算法。 1、选择排序:简单选择排序 2、选择排序:堆排序...
分类:其他好文   时间:2014-04-29 13:36:20    阅读次数:340
排序算法-冒泡——插入——快排
冒泡排序,往两个方向泡,一个往小泡,一个网大泡 #include #include #include void bubble_sort(int *a,int n){ int temp; for(int i=0;i<n;i++) for(int j=0;ja[j+1]){ temp=a[j]; a[j]=a[j+1]; ...
分类:其他好文   时间:2014-04-29 13:28:21    阅读次数:364
6364条   上一页 1 ... 634 635 636 637 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!