- Build and Execute
- run "gradle jar" to generate the jar file under ~/build/libs/
- execute the jar by running "java -jar (name).jar (arguments)"
- arguments are 3 non-negative numbers seperated by whitespace:
- first: K litres, type is double
- second: i-th row, type is int
- third: j-th glass, type is int
- output example "Result is 0.25 litre"
- Algorithm
- Simple recursion to calculate the input from upper level where half from upper left and half upper right
- Some thoughts
- Add a 2D array to store the results of calculated glasses as a cache
- Handle overflow inputs
- Other algos, (top-down to fill the 2d array ?)
-
Notifications
You must be signed in to change notification settings - Fork 0
kasimmm/Coding-Challenge
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
coding challenge
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published