Author : Thanh Truong Email : [email protected]
- [Java Platform (JDK) 7] (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- Apache Maven 3.x
-
mvn clean
-
mvn compile
-
mvn package
-
java -jar target/challenge-1.0.jar server configuration.yml
-
Point your browser to http://localhost:8080/puzzle
-
Upload a test data file (strictly followed the agreed format in the challenge)
-
Click 'Solve it'
The source folder contains
root
|-- src
| |-- main
| | |-- java
| | | |-- example
| | | | |-- config
| | | | | |-- ExampleServiceConfiguration.java
| | | | | |-- MessagesConfiguration.java
| | | | |-- resource
| | | | | |-- PuzzleResource.java
| | | | | |-- SolveResource.java
| | | | |-- solver
| | | | | |-- PuzzleSolver.java
| | | | |-- ExampleService.java
| | +-- resources
| | | |-- pages
| | | |-- puzzle.html
| | |
| +-- test
| +-- sample1.txt
| +-- sample2.txt
| +-- sample3.txt
+-- pom.xml
-
To fulfill the requirement for delivering result within 1 minute I implemented system clock to stop the running solver.
-
For the sample 3, my solver showed better "total revenue" the result given by the challenge
-
There are rooms to improve of course :)