HackerRank icon indicating copy to clipboard operation
HackerRank copied to clipboard

Greedy/Sherlock and the Beast is a Diophantine equation which can be solved without loops.

Open jeffreydwalter opened this issue 6 years ago • 1 comments

I have implemented this solution in Go in this PR: https://github.com/RyanFehr/HackerRank/pull/239

You guys might want to update the java solution to match. :)

jeffreydwalter avatar Jan 29 '19 02:01 jeffreydwalter

I would also note that the mathematical solution is O(1), not O(n) like the currently listed solution.

jeffreydwalter avatar Jan 29 '19 17:01 jeffreydwalter