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.
if(true) return true;
else return false;
vibes
Can't help without seeing your code.
Out of curiosity based on how i refactored my solution, why is this more popular of a solution than return (cast) (a+b)? It seems declaring another variable, even a local one, is more work than needs to be done when you can just return the value.
Is there a best practice that says a declared local variable is less prone to bugs or is it just preference as ease of understanding?
a
andb
already are of the typebyte
, so casting them will not do anything. However, the addition operator+
returns anint
(as bytes are not necessarily used as numbers, soa + b
implicitly does is(int) a + (int) b
), hence we do need to cast the result.Not an issue.
My solution on C# passed for any tests but failed on performance and random tests. And always result different for 1 (Expected: 405
But was: 404 for example). Whats wrong with this tests?
Impressive... You have been able to keep it short!
Hi KsanfFillum!
You should to create better algorythm for calculate best combination of 7 card instead 5 in this Kata. And input data will playerHand, opponentHand, tableCards, so it will be totally another program
How would a Texas Hold'em Poker kata be different than this one? In the end, the same rules apply to determine the winning hand. It would only make sense if you created a full poker game, betting and folding included.
Sorry, English isn't my native, i can mistake with it.
First suggest was add reference for poker rules (link on wiki or rules description) on details becouse there are many kinds of poker (i was try some of them but only third was correct).
And second was create new kata about Tehas Hold'em Poker, i will solve it with pleasure because it will be harder that this one)
Hi, thanks for spending your time on my kata! I think that I do not fully understand your suggestion... :)
This comment is hidden because it contains spoiler information about the solution
Which max memory can be used in program on C#?
My one use 20 Mb (that says me VS) and always throw me an error that "Submission timed out while communicating with our servers" or "Unknown error" with my solution, but test cases are working.
Thanks, it's totally clear now.
P.S. my fault)
Loading more items...