Skip to content

My Java solutions for LeetCode Online Judge.

Notifications You must be signed in to change notification settings

shaowei-su/leetcode-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-java

My Java solutions for LeetCode Online Judge.

Build Status

Build Status

Requirements

  • Java >= 1.6
  • Gradle >= 1.8.6 (1.8.6 is the only version I have tried)

Generate an eclipse project

./gradlew eclipse

Generate an IntelliJ IDEA project

./gradlew idea

Generate a file for a question

./gradlew question "-Pq=Some Question"

The above command will generate a source file called src/main/java/some_question/SomeQuestion.java, and you can write your solution in this file directly.

Unit tests are also embedded as inner classes of the main code. For an explanation of this design choice see Ben J. Christensen's JUnit Tests as Inner Classes.

Run unit tests

If you write some unit tests, you can use the following command to run them.

./gradlew test

About

My Java solutions for LeetCode Online Judge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%