Yes, you are right. I was just overthinking. In fact, I am shamelessly using this method in other katas now. Thanks!
It's not a big deal. The numbers would have to be ginormous, certainly far larger than the test cases in this kata, for the recursive gcd to use significant stack depth.
Will this solution not increase the maximal recursion depth to obtain the solution?
damn boi, that's clever af
I want to add one more requirement to this kata to make it substantially different from existing Tower of Hanoi kata. I will close this issue when I am done.
But it would be pretty common to find solutions that would work in both of them.
Not a duplicate. The number of disks in this kata can be large so it cannot be directly solved with the same approach as kata in your links.
Thanks, I'm glad you explained this.
Added more tests (including random tests and large tests).
my self esteem after seeing these 1 line solutions be like "not stonks".
I was confused that math operators precedence is not taken into account: FluentCalculator.ten.plus.two.times.five should be in this kata 60, not 20 as one may expect. Anyway, great kata!
I hate you
That's true! Thank you!