Ad
  • Custom User Avatar

    if(true) return true;
    else return false;
    vibes

  • Custom User Avatar

    Can't help without seeing your code.

  • Custom User Avatar

    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?

  • Custom User Avatar

    a and b already are of the type byte, so casting them will not do anything. However, the addition operator + returns an int (as bytes are not necessarily used as numbers, so a + b implicitly does is (int) a + (int) b), hence we do need to cast the result.

  • Custom User Avatar
  • Custom User Avatar

    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?

  • Custom User Avatar

    Impressive... You have been able to keep it short!

  • Custom User Avatar

    Hi KsanfFillum!

    1. But there is a link... :)
    2. My personal opinion is that a Kata is a practice and not a complete program. I don't think that adding extra requirements to the practice would add anything.
  • Custom User Avatar

    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

  • Custom User Avatar

    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.

  • Custom User Avatar

    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)

  • Custom User Avatar

    Hi, thanks for spending your time on my kata! I think that I do not fully understand your suggestion... :)

  • Custom User Avatar

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

  • Custom User Avatar

    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.

  • Custom User Avatar

    Thanks, it's totally clear now.

    P.S. my fault)

  • Loading more items...