Skip to content

Commit 0a7081c

Browse files
committed
ArraysSortTest__库函数Arrays.sort
1 parent e95236c commit 0a7081c

File tree

9 files changed

+108
-0
lines changed

9 files changed

+108
-0
lines changed

.idea/compiler.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ java编程基础 面向对象 javaAPI 集合 IO GUI JDBC 多线程 网络编程
4444
- [剑指Offer](Offer/README.md)
4545
- [java并发编程的艺术](artConcurrent/README.md)
4646
- [leetcode](leetcode/README.md)
47+
- [牛客高频](nowCoder/README.md)
4748

4849
- [Test]()
4950

leetcode/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@
9797

9898

9999

100+
101+
102+
103+
100104
--------------------------
101105

102106
- [x] [SpaceTest__最长公共前缀](src/main/java/com/cpucode/longpublic/SpaceTest.java)

nowCoder/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
# [牛客高频](../README.md)
3+
4+
## 文件目录
5+
6+
- [排序](#排序)
7+
- [查找算法](#查找算法)
8+
- [数组](#数组)
9+
- [字符串](#字符串)
10+
- [链表](#链表)
11+
- [二叉树](#二叉树)
12+
- [数学](#数学)
13+
- [栈和队列](#栈和队列)
14+
- [动态规划](#动态规划)
15+
- [回溯算法](#回溯算法)
16+
- [设计](#设计)
17+
- [数据库](#数据库)
18+
19+
---------------------
20+
21+
## [排序](src/main/java/com/cpucode/sort)
22+
23+
- [x] [ArraysSortTest__库函数Arrays.sort](src/main/java/com/cpucode/arrays/sort/ArraysSortTest.java)
24+
25+
------------------------
26+
27+
28+
---------------------
29+
30+
- [返回顶层](../README.md)

nowCoder/nowCoder.iml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4+
<output url="file://$MODULE_DIR$/target/classes" />
5+
<output-test url="file://$MODULE_DIR$/target/test-classes" />
6+
<content url="file://$MODULE_DIR$">
7+
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8+
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9+
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10+
<excludeFolder url="file://$MODULE_DIR$/target" />
11+
</content>
12+
<orderEntry type="inheritedJdk" />
13+
<orderEntry type="sourceFolder" forTests="false" />
14+
</component>
15+
</module>

nowCoder/pom.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.example</groupId>
8+
<artifactId>nowCoder</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<build>
12+
<plugins>
13+
<!-- java编译插件 -->
14+
<plugin>
15+
<groupId>org.apache.maven.plugins</groupId>
16+
<artifactId>maven-compiler-plugin</artifactId>
17+
<version>3.2</version>
18+
<configuration>
19+
<source>1.8</source>
20+
<target>1.8</target>
21+
<encoding>UTF-8</encoding>
22+
</configuration>
23+
</plugin>
24+
</plugins>
25+
</build>
26+
27+
</project>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.cpucode.arrays.sort;
2+
3+
import java.util.Arrays;
4+
5+
/**
6+
* @author : cpucode
7+
* @date : 2021/5/19
8+
* @time : 23:26
9+
* @github : https://github.com/CPU-Code
10+
* @csdn : https://blog.csdn.net/qq_44226094
11+
*/
12+
public class ArraysSortTest {
13+
public static void main(String[] args) {
14+
int[] arr = {5,2,3,1,4};
15+
int[] arr1 = MySort(arr);
16+
17+
for (int i : arr1){
18+
System.out.print(i);
19+
}
20+
}
21+
22+
public static int[] MySort (int[] arr) {
23+
Arrays.sort(arr);
24+
25+
return arr;
26+
}
27+
}

0 commit comments

Comments
 (0)