From 5fad0c1cf4dc6c2c42fa96eebf0841b204262965 Mon Sep 17 00:00:00 2001 From: 13104928451 <2860467163@qq.com> Date: Mon, 24 Oct 2022 19:02:53 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zzh13104928451/13104928451.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 zzh13104928451/13104928451.java diff --git a/zzh13104928451/13104928451.java b/zzh13104928451/13104928451.java new file mode 100644 index 00000000..48ff8db8 --- /dev/null +++ b/zzh13104928451/13104928451.java @@ -0,0 +1,22 @@ +/** + * 冒泡排序函数 + * aa bb cc + * @param a 待排序的数组 + * @param n 待排序的数组长度 + */ +public static void bubbleSort(int [] a, int n){ + // 你的代码,使无序数组 a 变得有序 + for (int i = 0; i < n; i++) { + for (int j = 0; j < n-1; j++) { + if(a[j] > a[j+1]){ + int tmp = 0; + tmp = a[j]; + a[j] = a[j+1]; + a[j+1] = tmp; + } + } + } + + +} //end + -- Gitee From f6ab120583987e5cc6cf6cc54e88c3f98cf0417a Mon Sep 17 00:00:00 2001 From: 13104928451 <2860467163@qq.com> Date: Mon, 24 Oct 2022 19:23:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/zzh13104928451/9622480.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 codes/zzh13104928451/9622480.java diff --git a/codes/zzh13104928451/9622480.java b/codes/zzh13104928451/9622480.java new file mode 100644 index 00000000..0ddec1fb --- /dev/null +++ b/codes/zzh13104928451/9622480.java @@ -0,0 +1,20 @@ +/** + * 冒泡排序函数 + * aa bb cc + * @param a 待排序的数组 + * @param n 待排序的数组长度 + */ +public static void bubbleSort(int [] a, int n){ + // 你的代码,使无序数组 a 变得有序 + for (int i = 0; i < n; i++) { + for (int j = 0; j < n-1; j++) { + if(a[j] > a[j+1]){ + int tmp = 0; + tmp = a[j]; + a[j] = a[j+1]; + a[j+1] = tmp; + } + } + } + +} //end -- Gitee From 2f3d24d6b7e6beec2b2de47900126c2557da8454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E8=BD=BB=E4=BA=91=E6=B7=A1?= <2860467163@qq.com> Date: Mon, 24 Oct 2022 11:25:56 +0000 Subject: [PATCH 3/3] rename zzh13104928451/13104928451.java to zzh13104928451/ 9622480.java. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 风轻云淡 <2860467163@qq.com> --- zzh13104928451/{13104928451.java => 9622480.java} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename zzh13104928451/{13104928451.java => 9622480.java} (100%) diff --git a/zzh13104928451/13104928451.java b/zzh13104928451/ 9622480.java similarity index 100% rename from zzh13104928451/13104928451.java rename to zzh13104928451/ 9622480.java -- Gitee