Retired
Mountain of Gold: Arrangement Problem (retired)
17 of 20amalkrishnan43216
Loading description...
Fundamentals
Data Structures
Lists
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.
I think there is a problem with your description. You give the following example:
list_1:[count(1)=minimum(floor(1/10*n),1] list_2:[count(1)=minimum(floor(length(list_1)/2)),1] list_x:[count(1)=minimum(floor(length(list_1)/2)),1] list_last:[count(1)=remaining 1s]
I believe that you want to take the maximum, not the minimum.
True. I changed the description.
The built-in function max does exactly what is required: return 1 as a minimum. However the wording 'max', I thought could be clarified a little bit more: what is required for specifying the stack would be a bound, that is between 1-->floor(1/10 * n) and 1-->floor(1/2 * length(list_one)). 'With two or more arguments, return the largest argument' is how max is specified in Python's help doc. However, the word 'maximum(floor(1/10n),1)' could be interpreted as a ceiling of 1 or floor(1/10n); so values like 0.9 or 0.8 are permissible. I am talking about the general specification of the problem for someone who is not familiar with the function max(). So I decided to word it as greater(floor(1/10*n),1) to explicitly specify that 1 is a lower-bound.
The javascript version of the "Mountain of Gold: Arrangement Problem" appears to be broken. The Test for this kata displays the "twoOldestAges" kata, a completely different kata.
duplicate issue
Tests need to be more thorough.
I'll look into it. There are 39 testcases in the validation process, 30 of which are randomly generated. There are only 5 example testcases, but they cover the full-range of the functionality required of the program. If I can think of other possible testcases covering alternate flows not covered, I'll be sure to update the test suite.
There's a dummy JS version. It should be deleted from the editor.
I missed that. I took it off. Thanks!