码迷,mamicode.com
首页 >  
搜索关键字:bubblesort    ( 398个结果
BubbleSort
1 public class BubbleSort { 2 public static void main(String[] args) { 3 //随机生成5个0到100之间的整数 4 int[] arr = new int[5]; 5 for(int i=0; i arr[j+1]){ 16 .... ...
分类:其他好文   时间:2019-02-11 10:29:26    阅读次数:175
十大经典排序算法(打倒拖延症系列)
一个排序算法可视化的软件,很魔性。 链接:https://pan.baidu.com/s/1hCoMku7UL7IN4hIdYTsuJg 提取码:4y4v 1.冒泡排序 void bubbleSort(int *a, int n) { for (int i = 0; i < n; i++) { fo ...
分类:编程语言   时间:2019-01-29 14:52:54    阅读次数:163
Bubblesort and oblivious
Problem 12. (Difficulty 2) Bubblesort and oblivious merge-sort each give a sequence ofcompare-exchange operations which sorts any array A[0..3]. Write ...
分类:其他好文   时间:2019-01-23 20:30:32    阅读次数:153
泡沫排序|bubble sort
def BubbleSort(lst): for i in range(len(lst)-1): for j in range(len(lst)-1-i): if lst[j]>lst[j+1]: lst[j],lst[j+1] = lst[j+1],lst[j] return lst 首先,不知道 ...
分类:编程语言   时间:2019-01-07 10:32:11    阅读次数:175
冒泡排序呀
public class BubbleSort { public static void main(String args[]) { int[] arr = {1,3,2,9,5,7,6,8,4}; System.out.println("没有排序之前的数组为:"); for (int num : ...
分类:编程语言   时间:2019-01-05 15:12:43    阅读次数:196
交换排序
#include "stdio.h" #define MAXSIZE 20 typedef int ElemType; typedef struct { ElemType r[MAXSIZE+1]; int length; }SortList; /* 冒泡排序:BubbleSort */ void ... ...
分类:编程语言   时间:2019-01-03 12:03:39    阅读次数:183
Go语言(Golang)冒泡排序
package main import ( "fmt" ) func BubbleSort(arr *[5]int) { for i := 0; i arr[j] { arr[i], arr[j] = arr[j], arr[i] } } } } func main() { arr := [5]in... ...
分类:编程语言   时间:2018-12-08 11:30:46    阅读次数:149
交换排序---冒泡排序
1 //冒泡排序 2 /** 3 * 5,8,3,15,14,68,17 4 * 5 * @param arr 6 */ 7 public static void bubbleSort(int[] arr){ 8 //控制比较多少轮 9 for(int i=0;iarr[j... ...
分类:编程语言   时间:2018-11-17 16:12:21    阅读次数:187
快速排序和几种简单排序
"冒泡排序" "基于冒泡的选择排序" "基于冒泡的快速排序" "插入排序" 冒泡排序 java public void bubbleSort(int[] a) { for(int i=0; i void Swap(T[] arr,int i,int j){ T temp = arr[i]; arr[ ...
分类:编程语言   时间:2018-11-14 12:28:19    阅读次数:139
数组排序
1、冒泡排序 1 function bubbleSort(arr) { 2 var len = arr.length; 3 for (var i = 0; i < len; i++) { 4 for (var j = 0; j < len - 1 - i; j++) { 5 if (arr[j] > ...
分类:编程语言   时间:2018-11-09 13:11:36    阅读次数:168
398条   上一页 1 ... 6 7 8 9 10 ... 40 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!