6 kyu
Pack the box.
Loading description...
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
no example tests with left overs... (the specs are very weird and unintuitive, btw...)
The description is very unclear. More details should be provided on how to place the boxes.
For those who don't know the rules, this may be a more understandable explanation:
updated description, clear now?
O_o
That's another missing spec: Elements that can't be filled will be skipped instead of halting the entire packing process.
This is, again, not specified anywhere, and only exists in the random tests. And this doesn't make much sense either (if you can't pack everything in a box, you can't pack everything in anyways so trying to pack more elements into the box is futile).
Specification updated. 2 Examples added to show both possible cases (box completely filled, box filled with as much as possible)
It is unspecified what happens if an upper case letter is encountered but the first available space do not have 2x2 space available, such as:
When
C
is filled there is no space for it at the first available slot:Similarly,
string = AbcDefg
givesat
D
, which again has no space forD
but has space forefg
.More complicated case:
After
abCD
:Where does
e
go? at the spot to the right ofC
?Either the entire semantics of
packing
needs to be specified, or it needs to be clearly defined whatfirst available space
means.Updated description and added test cases in example section of description to show behavior.
This comment has been hidden.
Guess you don't need an answer anymore
Did you just approve another kata with blatantly missing specs in the description?
I'm fine with that, since author is no longer active and kata is nice. I've updated the description to improve the specs.
Yes, I approved it. I understood the description perfectly fine, and did not consider the specs incomplete.