From 24b3fd2961e3d5707efdeec47ff9b82ce87fef7c Mon Sep 17 00:00:00 2001 From: xiaomali987123 <11909786+xiaomali987123@user.noreply.gitee.com> Date: Fri, 4 Nov 2022 06:11:21 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20xiaomali?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/xiaomali/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 codes/xiaomali/.keep diff --git a/codes/xiaomali/.keep b/codes/xiaomali/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 92adc8e5afd4bf7d82bad8c3468e9665853ea27c Mon Sep 17 00:00:00 2001 From: xiaomali987123 <11909786+xiaomali987123@user.noreply.gitee.com> Date: Fri, 4 Nov 2022 06:12:06 +0000 Subject: [PATCH 2/2] add codes/xiaomali/10044159.java. Signed-off-by: xiaomali987123 <11909786+xiaomali987123@user.noreply.gitee.com> --- codes/xiaomali/10044159.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 codes/xiaomali/10044159.java diff --git a/codes/xiaomali/10044159.java b/codes/xiaomali/10044159.java new file mode 100644 index 000000000..83497d9a5 --- /dev/null +++ b/codes/xiaomali/10044159.java @@ -0,0 +1,18 @@ +/** + * 冒泡 排序 函数 + * 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 < i; j++) { + if (a[i] < a[j]) { + int t = a[i]; + a[i] = a[j]; + a[j] = t; + } + } + } +}//end \ No newline at end of file -- Gitee