Ad
  • Custom User Avatar
  • Custom User Avatar

    Okay there is a description but what is the purpose of this kata?
    What are you expecting from players??

  • Custom User Avatar

    The term "size" in the description is ambiguous for squares since it could be either an area or the length of a side. Additionally, the description is generally confusing (my opinion as well as that of several others in the discussion).

    An improvement would be something like:

    a - length of side of square 1
    b - length of side of square 2
    m - length of x-dimension of suitcase
    n - length of y-dimension of suitcase

  • Custom User Avatar

    How it working?

    This is kata test cases not right and strange!

  • Custom User Avatar

    The description clearly needs clarification:

    Red:  "01001000"
    Blue: "01011100"
    #=> "RB"
    

    So, first there's a R because If a button is pressed while the other button is being held down, it will be ignored., okay. Then B appears because B is pressed.
    But then why aren't there 2 Bs? Shouldn't there be another B since If a button is released while the other is being held down, the other 's LED will blink.?
    The condition The LED will only blink once even if the button is held down. can only mean "the LED will only blink the moment it's pressed", because otherwise the condition above is contradictory (unless in the special case that a blue button press is shadowed by the red button press).

  • Custom User Avatar

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

  • Custom User Avatar

    In c#, the brackets of the starter code should be formatted properly.

    The description should explain a and b are the length of the sides of the two squares, m and n are the length and width of the suitcase.
    Using descriptive variables would be a good self-documenting way of solving this. ex: FitSquares(int squareASide, int squareBSide, int suitcaseWidth, int suitcaseLength)

    Lastly, there is at least one solution in c# that clearly should not have passed. It is currently marked as the second best answer. :P
    Test cases could include all permutations of 1234 to keep out cheating answers.

  • Custom User Avatar

    Question needs to be explained a little better for what the input is specifically because it sounds like you have two boxes and two suitcases but the tests don't support that theory.

  • Custom User Avatar

    typo:
    you said there was 3 buttons but then later said there were 2.

  • Custom User Avatar
  • Custom User Avatar

    C translation kumited

    please scrutinize for approval

  • Custom User Avatar
  • Custom User Avatar

    Naming convention: sevSeg --> ``sev_seg`

  • Custom User Avatar

    If the input is invalid, return -1.

    What is a invalid input? It is not mentioned anywhere, and it could be anything (String length not equal? Some input not strings? String contains invalid characters?).

  • Custom User Avatar

    Returning -1 is a bad design. It makes your code incompatible in other languages.

    Plesae use proper design and throw an exception instead so others will learn the right thing ;-)