这个项目仅用于leetcode
刷题,所有的题解都在test
文件夹中。
由于习惯了Maven
的环境配置,J2EE
的导包配置反而不会了,所以这里使用的框架是SpringBoot
。通过一个个的单元测试构成整个练习题项目的内容。
放心,这个项目没有加任何其他JAR
包,估计打了包也不准用。所以就在Oracle jdk 1.8
环境下很平常的建一个SpringBoot
项目并复制所有src/
文件夹下的文件到你的src/
中就能复刻。
主包是cn.sakebow.study.leetcode
,其中分为三个小包,分别是easy
、hard
、nightmare
和violence
,前三个分别对应leetcode
题库中的简单、一般和困难,而最后则是leetcode
竞赛的内容。
由于类名不能是数字和符号,所以所有的类名都只能是英文名称。各位读者需要查看的时候可以在文件资源管理其中搜索题目的英文名称即可。
玩得开心!
This project is only for answering questions in leetcode
, with all the answers in test
folder.
I'm so familiar with the environment configuration of Maven
that I forget how to configure in J2EE
. Therefore, Here comes the SpringBoot
framework, containing each unit test files.
Easy. This project don't have any other JAR
s. Also it may be banned. So to reproduce, you can just create a minimal SpringBoot
project based on Oracle jdk 1.8
and copy all files in src/
into your src/
folder.
The main package is cn.sakebow.study.leetcode
, with 3 sub-packages inside, respectively easy
, hard
, nightmare
and violence
. The first 3 correspond to the easy, normal and hard questions, while the last represent questions in competitions held by leetcode
.
As for the reason that numbers and symbols, so all the class name should be English. If you'd like to refer, just search the English name of questions in file manager.
Have fun!