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.
Thanks for the suggestion, I changed the code of the sample tests and tests accordingly
Thanks, that was helpful.
Help section says
so the fork should do the trick
actually i don't know about when and why merge conflicts occur, so i do not really know
where to look for what kind of error and what i need to do to reproduce the merge conflict.
google gave me
https://github.com/Codewars/codewars.com/issues/1949
so i forked the translation
The tests in the java-version does not use assertEquals correctly. When checking the number of groups, it does
assertEquals("found too many or too few groups.", m.groupCount(), 3);
but Syntax of assertEquals is
assertEquals (<text>,<expected>, <actual>)
so it needs to be
assertEquals("found too many or too few groups.",3, m.groupCount());
Thanks for reviewing.
I changed them to braces which is of course much more java-esque.
-good hint with the internal solution, didn't think about people probing for it. I made it private
Great Kata. Everybody should be able to try this, so I kumited a
Java translation.
Please review and approve.
Java translation kumited, please review and approve.
Java translation kumited. Please review and approve.
The signature has been fixed some time ago. I added some sample test cases and random tests as well.
I published a java translation of this,please review an approve.
Forked and corrected, the "merge conflict" does no longer show up. I don't have experience with that kind of errors, i hope i did it the right way
In my opinion, the actual description is clear and logical and I have the impression it is what was intended with the task.
Finding a clear and logical explanation for (won,lost) = (0..2,0..1) seems a lot more fuzzy to me, so to me it seems to be
more logical to adjust the test data to the actual description/intention.
As ((1,0),(0,1)) is just a subset of ( rand(0..2),rand(0..1) ), which is the actual test setup, I would expect all valid solutions to still be
valid. But that is of course up to be discussed among people more able and saner than me....
Thanks !
To produce something with only tupels of (won,lost) = (1,0) | (0,1) something along the lines of
should do the trick
Stupid me, it's of course "records". As i said, not native.
But even as I'm clearly linguistically changelled here, I still can't see how
and
fits to data like
(SELECT * FROM fighters WHERE won>1 OR lost>1)
To me the description and example reads like
ONE row/record = result of ONE fight = ( won=1 and lost=0) (exclusive) or (won=0 and lost=1); no ties possible
but the data implies
ONE row/record = results of SEVERAL fights, giving counts of won and lost fights that were ended with the same move.
or
ONE row/record = result of ONE fight, where 0 is logical false and non-0 is logical true. Ties possible
So how is it meant to be ?
Basically a nice Kata, but your database does not match your descritpion (or the other way round)
Description says
So one would expect (won,lost) = (1,0) or (0,1) whereas in your database you use values > 1 and there are (a lot of) rows where won AND lost are >0.
And by the way: im not a native speaker, but im quite sure that the quoted sentence lacks a verb.
Loading more items...