Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There may be an issue with the randomized tests in Elixir: they appear to expect a boolean instead of a string.
I agree it's very expensive at runtime.
Nice recursive solution, but will hang for any modestly large number of dice, e.g.
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
This comment is hidden because it contains spoiler information about the solution
Thanks!
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.
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.
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.
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.
Thanks, trincot! Not that I frequently honour the principle, but on a "social" site like Codewars extensive comments should probably be the norm.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The comments make this very clear code. Great!
And this is not clear from the description - should be added to it.
Loading more items...