Ad
  • Custom User Avatar

    It ought to be flexible enough with the latest edit.

  • Custom User Avatar

    I agree with this. If this hadn't been ranked at 7 kyu, I would have spent a long time working out how to optimally break chocolate in as few "operations" as possible. Clearly that turned out not to be necessary, but I shouldn't have to guess that based on the rating.

  • Custom User Avatar

    Sure, and sure, but it does fail.

  • Custom User Avatar

    It would be better to allow more solutions than it currently does, but what you suggest misses the point of the exercise. It's not to implement either case maximally efficiently, but to see the equivalence between 'non-recursive' and recursive versions of the same function.

    So it's not really relevant which function needs to be fixed, as it involves the same principle. And then I prefer the simple way it's currently defined. I'll add the wikipedia link though.

  • Custom User Avatar

    Well it's a terrible implementation of reverse, but still technically valid. So really the test shouldn't fail.

  • Custom User Avatar

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

  • Custom User Avatar

    Add your approach here, but mark it as a spoiler.

  • Custom User Avatar

    It would be very helpful if the "Cheating" tests told me how I was cheating. I keep failing the second one but have no idea why since they aren't in the visible test code. (It does say "should use first argument", but I'm using all the arguments, so I must be misunderstanding the test.)