From 468e7d6f83052c12d027b60e98da6fe0d64623d3 Mon Sep 17 00:00:00 2001 From: hcyahcya <11902828+hcyahcya@user.noreply.gitee.com> Date: Thu, 3 Nov 2022 06:46:10 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=20hcyahcya?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/hcyahcya/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 codes/hcyahcya/.keep diff --git a/codes/hcyahcya/.keep b/codes/hcyahcya/.keep new file mode 100644 index 000000000..e69de29bb -- Gitee From 250dbf0c85ca3984420d3ef951cabfc2c3785366 Mon Sep 17 00:00:00 2001 From: hcyahcya <11902828+hcyahcya@user.noreply.gitee.com> Date: Thu, 3 Nov 2022 06:47:52 +0000 Subject: [PATCH 2/2] add codes/hcyahcya/10042948.java. Signed-off-by: hcyahcya <11902828+hcyahcya@user.noreply.gitee.com> --- codes/hcyahcya/10042948.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 codes/hcyahcya/10042948.java diff --git a/codes/hcyahcya/10042948.java b/codes/hcyahcya/10042948.java new file mode 100644 index 000000000..667eee0f5 --- /dev/null +++ b/codes/hcyahcya/10042948.java @@ -0,0 +1,11 @@ +public static void bubbleSort(int [] a,int n){ + for(int i = 0; i < n-1 ; i++){ + for (int j = 0;j < n-1-i;j++){ + if(a[j] > a[j+1]){ + int temp = a[j]; + a[j] = a[j+1]; + a[j+1] = temp; + } + } + } +} \ No newline at end of file -- Gitee