Code Monkey home page Code Monkey logo

sale-adds's Introduction

Author : Thanh Truong Email : [email protected]


Requirements


Quick start

  1. mvn clean

  2. mvn compile

  3. mvn package

  4. java -jar target/challenge-1.0.jar server configuration.yml

  5. Point your browser to http://localhost:8080/puzzle

  6. Upload a test data file (strictly followed the agreed format in the challenge)

  7. Click 'Solve it'


Implementation

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

Notes

  • 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 :)

sale-adds's People

Contributors

thanh-truong avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.