This is a coding assignment for an internal inteview
- Author: Chenyue Gao
- Date: June 8th 2018
- Get a Fibonacci Sequence at position n
- Get a single Fibonacci Number at position n
Windows 10
MacOS 10.11.6
Git 2.10.1 or above
Maven 3.2.5 or above
JDK 1.8
$ mkdir inteview
$ cd inteview
$ git clone https://github.com/gaochenyue/fibonacci.git
$ cd fibonacci
$ mvn clean package
If you don't want to build your own, you can directly download the pre-built JAR file here
$ java -jar target/fibonacci-1.0.0.jar
http://localhost:8080/
GET http://localhost:8080/fibonacci/sequence/{n}
{
"fibonacciSequence" : [ {
"position" : 0,
"value" : 0
}, {
"position" : 1,
"value" : 1
}, {
"position" : 2,
"value" : 1
}, {
"position" : 3,
"value" : 2
} ]
}
GET http://localhost:8080/fibonacci/number/{n}
{
"position" : 6,
"value" : 8
}
/fibonacci/src/test/java/app/FibonacciControllerTests.java
/inteview/fibonacci/logs