From 38a51bdcfaecc4789a8c9532ad29186acc344725 Mon Sep 17 00:00:00 2001 From: libospinach <45868766+libospinach@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:46:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E3=80=81=E5=86=92=E6=B3=A1?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E7=BB=83=E4=B9=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/never/{ => basic}/BitOperation.java | 2 +- src/main/java/com/never/basic/BubbleSort.java | 21 ++++++++++++++++ src/main/java/com/never/basic/CommonUtil.java | 14 +++++++++++ src/main/java/com/never/basic/NRecursion.java | 22 +++++++++++++++++ src/main/java/com/never/basic/SelectSort.java | 22 +++++++++++++++++ src/main/java/com/never/basic/SortDemo.java | 23 ++++++++++++++++++ target/classes/com/never/BitOperation.class | Bin 910 -> 0 bytes .../com/never/basic/BitOperation.class | Bin 0 -> 925 bytes .../classes/com/never/basic/BubbleSort.class | Bin 0 -> 615 bytes .../classes/com/never/basic/CommonUtil.class | Bin 0 -> 451 bytes .../classes/com/never/basic/NRecursion.class | Bin 0 -> 780 bytes .../classes/com/never/basic/SelectSort.class | Bin 0 -> 651 bytes target/classes/com/never/basic/SortDemo.class | Bin 0 -> 1093 bytes 13 files changed, 103 insertions(+), 1 deletion(-) rename src/main/java/com/never/{ => basic}/BitOperation.java (95%) create mode 100644 src/main/java/com/never/basic/BubbleSort.java create mode 100644 src/main/java/com/never/basic/CommonUtil.java create mode 100644 src/main/java/com/never/basic/NRecursion.java create mode 100644 src/main/java/com/never/basic/SelectSort.java create mode 100644 src/main/java/com/never/basic/SortDemo.java delete mode 100644 target/classes/com/never/BitOperation.class create mode 100644 target/classes/com/never/basic/BitOperation.class create mode 100644 target/classes/com/never/basic/BubbleSort.class create mode 100644 target/classes/com/never/basic/CommonUtil.class create mode 100644 target/classes/com/never/basic/NRecursion.class create mode 100644 target/classes/com/never/basic/SelectSort.class create mode 100644 target/classes/com/never/basic/SortDemo.class diff --git a/src/main/java/com/never/BitOperation.java b/src/main/java/com/never/basic/BitOperation.java similarity index 95% rename from src/main/java/com/never/BitOperation.java rename to src/main/java/com/never/basic/BitOperation.java index 05f6b50..266620b 100644 --- a/src/main/java/com/never/BitOperation.java +++ b/src/main/java/com/never/basic/BitOperation.java @@ -1,4 +1,4 @@ -package com.never; +package com.never.basic; public class BitOperation { public static void main(String[] args) { diff --git a/src/main/java/com/never/basic/BubbleSort.java b/src/main/java/com/never/basic/BubbleSort.java new file mode 100644 index 0000000..0178c4f --- /dev/null +++ b/src/main/java/com/never/basic/BubbleSort.java @@ -0,0 +1,21 @@ +package com.never.basic; + +/** + * @Description: 冒泡排序 + * @author: Bo Li + * @date: 2022年08月24日 10:19 + */ +public class BubbleSort { + public void bubbleSort(int[] arr){ + if(arr == null || arr.length <2){ + return; + } + for(int i = 0 ; i i;j--){ + if(arr[j]1nj~lCQZjC`8ImgYW zn|@dJ+cHqvK5-i1Gj$*^(>%T1I`IZlvF(!cWYR!1L9$m~uU>64E`uHs3a5kxgrsa! zI+QMDm!dclZ^*%9TA}Pde<1fy$fR5TFzCAXm8LuO@7P!MTyUOW6yxUtac}}i@LZr( zqZZWW$}z+zUSe3}slz&TiKjhDAjAb)DO|)dJ^Jx6vrXzdW}_T?YdpPMF<)&~%-1)K z@)uYY%4cLMBNXO&EgBPho;KY@gZgj58!ST>1Wb^rMJvgrNTG-{X1P{N^eiKTDpzI= zS=>f0BDXOifJ?Z{_c7eU6*#1q#5!{wdTd1T(ij!pu7{J{tdEXoQL;9gn6|ii+n+w}1-roKKPPrHELGpgQXs jJwn5ihC{tdnS=2QanZ6cJ!UW_D7=fGq%HU*x{H3r>2_tX<+kHU z1zXF>R2gltPvIZe0zy*OC>@GN*%Zj^ur}rt_O7kz7D91_px+Z1YRA%h{y^>|kT$Lg zguv=U42yjtJDH2*fkzXl8l zy#miO^jvB|ZOt7*e4>$p!!w-(4GhtC1_?NeVR~8QF~W#0K4i8M)d&ZIL)Ft@W<&hTr{aq1}-IIEjCP()25f85@YB&iiI!ex9_MKp>{r7DT4vI-e7wYa`YG1d^OMcW zM@*2dY*t>p`G8D*aUWK`aRBR`INCq@!K(wLHMEi7mXhJ4#4Vsogc&xkajXU_v8jPc lR2b6_TxUj+dYn>*`3r_<+n6}wWlB(Ji=V_6tkH{1{Q<;(q|E>T literal 0 HcmV?d00001 diff --git a/target/classes/com/never/basic/BubbleSort.class b/target/classes/com/never/basic/BubbleSort.class new file mode 100644 index 0000000000000000000000000000000000000000..525466faecac198610521524314a31813a6ac0e9 GIT binary patch literal 615 zcmZ`#%Wl&^6g}6ExN(vuZ2~RDuEYj~x{8sI*pOsFC8S89U4(Yi)!4CMLSk2rQ}}>> zNrcpOS0EN%vgo?Mz)zrxa3@4`Lq{`r?zyjXX0CsK&jGx^t_=eZZERuN!XpbighE@! zGV2ob=Cc!magYonLbWgB=x{a(qV$~z#vIw~C!rXhh*T=P3L4o5IVCv#Fq!yqbRMOC zAf__(U(W)r8YF4R&`udv2AK#yz7=OH278dq(lB}> zm4@ow*w#p#i!w|UEIcm5flJuAUj?D28vL<{-}^_wCrKZ&zm zJd8dQEY{p()p!D(KTs_V{1g<}T8w~gfq-4%XEjXh0?SqW9%1~yr0 ZouhSFHf}+53!Aon!Q{=U2B$PU_ygvrch&#^ literal 0 HcmV?d00001 diff --git a/target/classes/com/never/basic/CommonUtil.class b/target/classes/com/never/basic/CommonUtil.class new file mode 100644 index 0000000000000000000000000000000000000000..d4e83c4427c1e1af62803a4131d36be7793b94b3 GIT binary patch literal 451 zcmZ`!O;5r=5Pj1Y3I!?RX9N%4pa**JsNq6l(uBxC<-%!OHoBxAq!jdTc{1_f5Aa7B zXNw6ZceC?m-pqTG{r>s<0&tCU2PRHzoZ2`eRBu(PiV?x=4`u{woGm25ov2jaZ<0{v zk0Okj=}fXn#50jAUH_3*@uJp*-XzKrKb2dV`=MB?$RB4(lBG|Dif;(@^{ZF~=|a8{ z?EX9m0=>x;c}_6q0f7`hjZ3DBWJPcuvP~YzJEd2 z>`%j`j0#-A;D765fd7dK$0}DoBQaLI572wrwmDWyvW6Px&D{X%aJZ_YQ8HQ_v602- zdfnm3>w3N6)azYN_coof?Qm?cxQP}HN=t7ih$N9JK03P6;0}Cw&S?uL;71tbG#|;}d zZQK&DdMZ@Op@7luj0DVw(aS)fG*Dr1w49BD__-WUsq73QUrt9dR{Fda&E!Na1eyas znt5Sx7R26IE|l*bJq!G0yiifNPv%UjP@vjA9-PWE=}l!g@rFsP!pVL*Q^pfgD*q_c zR=AuAh`xXm{)Lj+?supO#fxlXp}WjQ63hjP!$kV89?SXKr8A6{u^&8AI!9?^?Y?&7 z!bZ-;CG6U`?cxsZ+GxAzpes=Se=LFWCd-rYY2YUpq~U9Np(P_)vaq`ft|IR#Qzy(G z$Qj>EC1qTc1?;(QnlhG7IpWvK@&oFh0alUYJgoZMvCUJKK6X$c&e3mg zjeW}=lhuaNGY`zeR{b5eo2`?BM)O7QjUnFu{@M7zvXMI7V;Im=hOSIv3j~)^Xc;v^ s_0TRW7ROY1X-f@U=1ym=;YvE*q*CK9gF5vBGUu>_5Wff#Y}c*LKQ=^;mH+?% literal 0 HcmV?d00001 diff --git a/target/classes/com/never/basic/SelectSort.class b/target/classes/com/never/basic/SelectSort.class new file mode 100644 index 0000000000000000000000000000000000000000..b14b34065acb2d7951cf683695a88ea737dad1b1 GIT binary patch literal 651 zcmZ`#O>fgc5Pg$uV#iHL3AjLTinz746iZM65)dJkB1H;t2=vlRH?9Q^j$Ju!;Rp1W z=6j z!AMWzFc?Nj6c)oQFK!E*=^rGhtnKy3m%Wg)cKG8t!y&M z(x*k72x`-p`e32aqWnG=z*Us_m*$kftx%=4hyr?{uWY=Aoc=1?w5AN$sL|GcH^9LX zkq|d%&Et<8TA|JCm@?FoL&#>wBJhgX2xyqon@2alf>CRxg>IACOJ63Y? z< z!AzroqJmisits47p<+(_=fz@aSinuO+)}Wp;5LK2?D<}_!XTN24Tj|7V9R9~sCd5n zyxpw1;Y(g?kSALS>b$YRLr>T}XEJ)_?J|s2>Os@;-90z7YJAtLTh$0 zqf9m8_1DjMtB0jkgLYVVpLzm3bHp+)((AZ@td7f=B<$1F>+KrVCgOG6!K8w_I_}{< z!^mm!^|sg8azh;tutW?~VpGzwjE4$Vbgbf$jx}T%Mo;HBqG2$OAGK>cZareqYX1mM zoLArMMsAbj2-*}i+!fLbtQSHO($eKkQd;J%mg{dZOqk`u8L@lF6gOv{IV}AzUX6lo zzZizhvw`&DU|h;cAZk