program is main.js, the solution class is josephus.js and the test file is josephus.test.js
josephus solution (printing a complete sequence) is of Order n.
need to have node.js and npm also a linux-like shell. need Jav (JDK) and eclipse
clone the repo using this command:
git clone git@github.com:desphilboy/service-victoria-test.git
then change directory to the created folder and type the following command:
npm install
npm start
npm test
functional implementation with a main() runner function using npm package manager, easy to install, easy to run.
100% tested with jest.
static function used as per the request.
complexity order is O(n * (n div k))
memory order is o(n)
Load the repo in eclipse,
run the program ( console app) by righclicking on Josephus class and run it as a java application.
run test by rightclicking on AllTests.java and run it as a Junit test