• Custom User Avatar

    The main idea is that the number of digits in a decimal number is roughly equal to its base 10 logarithm. For example, 10^3 = 1000 (3 + 1 digits), 10^4 = 10000 (4 + 1 digits), and so on. This allows us to approximate the range of the "elegant" value (tens, hunderds, thousands, ...).

  • Custom User Avatar

    Thanks for the translation!

  • Custom User Avatar

    Great, thanks for the translation!

  • Custom User Avatar

    Again, thanks for the suggestions. I published a new version here with some extra checks on random test generation (unconstrained depth and division by zero should be avoided now).

  • Custom User Avatar

    Thanks, I added some random tests. Do you think using eval is a big issue here? I don't see how it can be used to evaluate a non-infix expression effortlessly, and eval-based solutions which are not trivial seem alright to me.

  • Custom User Avatar

    Thanks, I do think that these two katas allow for somewhat different solutions (this one being a bit easier), but I see your point. Will it be considered different enough if I add non-valid expressions as possible inputs and require the user to return a separate value for them (e.g. null)?