将项目修改为maven项目

This commit is contained in:
LingZhaoHui 2020-11-15 14:26:19 +08:00
parent 5efdc2391a
commit 6a9a705692
30 changed files with 120 additions and 23 deletions

23
.classpath Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
target
.idea
*.swp
*.class

23
.project Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>leetcode</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

27
pom.xml Normal file
View File

@ -0,0 +1,27 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.algorithm</groupId>
<artifactId>leetcode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>leetcode</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,4 +1,4 @@
package leetCode;
package com.leetcode.array;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -1,4 +1,4 @@
package jiuzhang;
package com.leetcode.jiuzhang;
/**
* @apiNote 给出两个整数 aaa bbb , 求他们的和

View File

@ -1,4 +1,4 @@
package list;
package com.leetcode.list;
/**
* @apiNote 在一个 n * m 的二维数组中每一行都按照从左到右递增的顺序排序每一列都按照从上到下递增的顺序排序

View File

@ -1,4 +1,4 @@
package list;
package com.leetcode.list;
class ListNode {
int val;

View File

@ -1,4 +1,4 @@
package list;
package com.leetcode.list;
/**

View File

@ -1,4 +1,4 @@
package list;
package com.leetcode.list;
/**
* @file SearchInsert.java

View File

@ -1,4 +1,4 @@
package num;
package com.leetcode.num;
/**
* @file SumNums.java

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 给定一个二叉树,确定它是高度平衡的对于这个问题,一棵高度平衡的二叉树的定义是一棵二叉树中每个节点的两个子树的深度相差不会超过1

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 比较两个字符串A和B确定A中是否包含B中所有的字符字符串A和B中的字符都是 大写字母

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 合并两个有序升序的整数数组A和B变成一个新的数组新数组也要有序

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 合并两个排序的整数数组A和B变成一个新的数组

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 给定一个只含非负整数的m*n网格找到一条从左上角到右下角的可以使数字和最小的路径

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
import java.util.ArrayList;
import java.util.List;

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
import java.util.List;

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 给定一个排序数组在原数组中删除重复出现的数字使得每个元素只出现一次并且返回数组的长度

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 翻转一个链表

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 给定一个字符串逐个翻转字符串中的每个单词

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
public class RotateString {
public char[] rotateString(char[] A, int offset) {

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 写出一个高效的算法来搜索 m × n矩阵中的值这个矩阵具有以下特性

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 对于一个给定的 source 字符串和一个 target 字符串你应该在 source 字符串中找出 target 字符串出现的第一个位

View File

@ -1,4 +1,4 @@
package simple;
package com.leetcode.simple;
/**
* @apiNote 设计一个算法计算出n阶乘中尾部零的个数

View File

@ -1,4 +1,4 @@
package string;
package com.leetcode.string;
import java.util.HashSet;
import java.util.Set;

View File

@ -1,4 +1,4 @@
package string;
package com.leetcode.string;
import java.util.HashSet;
import java.util.Set;