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.
Interesting and funny kata to learn and understand some new concepts.
@mmangiamusardo please mark your post as having spoiler content next time.
This comment is hidden because it contains spoiler information about the solution
for input {2,2,1,3,2,2,3,1,1,2,2,3,3,2,1,3} my algorithm produces valid solution {{1,3,4,2},{4,2,1,3},{3,4,2,1},{2,1,3,4}}
yet the test says it's wrong.
Enjoyable coding challenge, congratulations.
For what it's worth, from my perspective I thought it was pretty clear. I wonder what you think is poorly explained?
Had to make a web app so that I could visualize & interact with the problem, but after that I was able to find a solution. Very fun kata, not like any I had done before, +1
Well now I feel silly.
I don't think the problem is well explained at all.
So, that's it! Thanks, now totally explained.
In all of the initial tests Hands are created, tested once and then freed. That let me to the assumption that it would always be that way. My mistake. Thanks again.
yes, but what is the issue here ? you modify
tracker
yourself, so you mutate the state of yourHand
object. then at the next call with the same object, of course the mutations will persist. take a look at how the random tests work, all of the hands are built beforehand and are played against each other at random, it is very likely that one hand get used multiple times, hence why the changes persistThanks, but that result would be expected - buildTracker() should indeed set values into the tracker field.
Let's use your test approach, but before any calls to buildTracker:
Output includes:
it seems to be your own code that modifies the
tracker
field though, I slightly modified your test incompare()
:the assertion fails.
cool))
This comment is hidden because it contains spoiler information about the solution
Loading more items...