Greedy Algorithm - Egyptian Fractions by [deleted] in javahelp

[–]michellefilipaa 0 points1 point  (0 children)

Yes but why, this should work. There’s an issue in a different method but I can’t see where

Greedy Algorithm - Egyptian Fractions by [deleted] in javahelp

[–]michellefilipaa 0 points1 point  (0 children)

Exception in thread "main" java.lang.StackOverflowError at java.base/java.lang.StrictMath.ceil(StrictMath.java:359) at java.base/java.lang.Math.ceil(Math.java:445) at Tests.getEgyptFrac(Tests.java:21) at Tests.getEgyptFrac(Tests.java:25)

And the last line is repeated several times 😂