Ad
  • Default User Avatar

    There may be an issue with the randomized tests in Elixir: they appear to expect a boolean instead of a string.

  • Default User Avatar

    I agree it's very expensive at runtime.

  • Custom User Avatar

    Nice recursive solution, but will hang for any modestly large number of dice, e.g.

    rolldice_sum_prob(56, 16)
    
  • Default User Avatar

    I do not think that the description makes sense financially:

    "rate - the monthly interest rate is expressed as a decimal, not a percentage. The monthly rate is simply the given yearly percentage rate divided by 100 and then by 12."

    The dependency between monthly and annual rates is exponential, not multiplicative. Writing the monthly rate m and the annual rate a as decimals, the correct relationship should be:

    (1 + m) ** 12 = 1 + a

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar
  • Default User Avatar

    Thanks for your quick response! Unfortunately I could not easily reproduce the problem because it occurred randomly and infrequently (I submitted my final answer without working around it, just trusting luck :-) In my issue report I reproduced the street name from memory. Again, thanks for having fixed this.

  • Default User Avatar

    Please when you post an issue give the input as well as actual and expected outputs, otherwise it is rather impossible to see a problem.
    I fixed the case of "Pussy Dog street".
    Thanks. Cheers.

  • Default User Avatar

    I think the random tests for R implicitly cut the street number to 4 digits; occasionally I got an error when my (correct) 5-digit street number (I believe at Pussy Dog street) was rejected by comparing it to an incorrect 4-digit number; the first digit was missing.

  • Default User Avatar

    This interesting kata could have been formulated more mathematically using graph colouring instead of genders; that would guarantee to eliminate more than half of the audience.

    As it is, the current family tree model represents biological parenthood relationships rather faithfully. You cannot be a biological parent of one of your own biological parents: that graph is acyclic for compelling chronological reasons. The author does not imply that biological parenthood is in any way morally superior to legal parenthood: he/she is just offering an interesting programming problem dressed up in a fairly well-recognizable model.

  • Default User Avatar

    Thanks, trincot! Not that I frequently honour the principle, but on a "social" site like Codewars extensive comments should probably be the norm.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    The comments make this very clear code. Great!

  • Default User Avatar

    And this is not clear from the description - should be added to it.

  • Loading more items...