Ad
  • Custom User Avatar

    Hi,

    Well... :/

    • the idea isn't new at all
    • duplicate of a lot of katas
    • the argument name should be lst, not list which is a builtin
    • you're almost asking for a builtin
    • you're asking for performances while your approach is totally wrong about that aspect

    You should unpublish it (before it gets retired)

    cheers

  • Custom User Avatar

    otherwise he can cheat the tests

    Most of the time it's not cheating, but rather users mutating the input and ended up botching up the tests, which is even worse ;-)

  • Default User Avatar

    Project euler 81 at least half of a dozen kata on this problem. Definitely a dup, should be expunged

  • Custom User Avatar

    why did you publish it again...? the 100% vote was to compensate the effort of creating the kata, not encourage you to republish it. I can remove it, if needed x)

  • Custom User Avatar

    I didn't realize there were other problems like this one, it's been unpublished

  • Custom User Avatar

    doesn't change the fact that you should unpublish it, but just to let you know for any other publication:

    • you HAVE to have fixed tests at the beginning of the full test suite (meaning "test cases" part of the editor)
    • expected/actual are swapped in the assertions
    • once you unswap them, you'll have to compute your expected result before you send the array to the user, otherwise he can cheat the tests
    • prefere the use of the new test framework

    cheers

  • Custom User Avatar

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

  • Custom User Avatar

    Hi,

    Sorry but that's a duplicate (don't ask for the link, it's almost impossible to find anything in the data base. But I'm sure I already solved that at least 2 times) => you should unpublish it.

  • Custom User Avatar
  • Custom User Avatar

    Thank you, this is my first kata so I'm not too familiar with the process. It's been added.

  • Custom User Avatar
  • Custom User Avatar

    Looks like this kata has a performance requirement, in which case you should add a performance tag.

  • Custom User Avatar

    Thank you, it's been fixed.

  • Custom User Avatar

    Initial sample test setup only tests on the first test case:

    test.assert_equals(money_maker(arr1), 1)
    test.assert_equals(money_maker(arr1), 14)
    test.assert_equals(money_maker(arr1), 27)
    
  • Custom User Avatar

    yeah, I just fixed it to better reflect that, thank you.

  • Loading more items...