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.
python new test frameworks
Okay there is a description but what is the purpose of this kata?
What are you expecting from players??
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
How it working?
This is kata test cases not right and strange!
The description clearly needs clarification:
So, first there's a
R
becauseIf a button is pressed while the other button is being held down, it will be ignored.
, okay. ThenB
appears becauseB
is pressed.But then why aren't there 2
B
s? Shouldn't there be anotherB
sinceIf 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).This comment is hidden because it contains spoiler information about the solution
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.
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.
typo:
you said there was 3 buttons but then later said there were 2.
PHP Translation
C translation kumited
please scrutinize for approval
TypeScript Translation
Naming convention:
sevSeg
--> ``sev_seg`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?).
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 ;-)