Retired

Mountain of Gold: Arrangement Problem (retired)

Description
Loading description...
Fundamentals
Data Structures
Lists
  • Please sign in or sign up to leave a comment.
  • BachMcCann Avatar

    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.

    • amalkrishnan43216 Avatar

      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.

  • BachMcCann Avatar

    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.

  • JavaScripts Avatar

    Tests need to be more thorough.

    • amalkrishnan43216 Avatar

      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.

  • Voile Avatar

    There's a dummy JS version. It should be deleted from the editor.