Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I also found debugging was not easy during main tests. What you can do is, inside the body of each method, print messages that allow you to know first which method is called, and then whatever you're interested in (arguments received by the method, state of the list at the beginning, state of the list after applying the method...). This way you may find out which operation your code is not doing right.

  • Custom User Avatar

    So I generally agree with the sentiment (especially with geometry/physics katas) but the sum of the first n numbers is such an important formula in the study of algorithms that I think it deserves its place here.

  • Custom User Avatar

    so true, after this kata i use filter with no math in

  • Custom User Avatar

    Exactly what it says in the description. Random lists are generated, random indexes are called, and random methods are used on the lists. This isn't unusual for a kata. If need be, test it locally. :)

  • Custom User Avatar

    Man, this is a much clearer description

  • Default User Avatar

    It's (0,4) not (4,0), order matters.

  • Custom User Avatar

    I can't agree more on that mate!

  • Default User Avatar

    That's a good point, I have no idea if there's a character limit. But since this passed, at least it's quite big.

  • Custom User Avatar

    sounds good (maybe not the straightest way, but that should do it, yes. ;) )

  • Custom User Avatar

    @B4B, yep, agreed. The Description is now updated with the following line under the section Input:

    A string comprised of integers in an unknown range; think of this string as the result when a range of integers is shuffled around in random order then joined together into a string

  • Custom User Avatar

    beware that the string has to be constitued by the integers themselves, not just theirs digits. For instance, in the first string, 68 doesn't exists.

    @Doc: might be worth an addition to the description, maybe? This question arise frequently, doesn't it? (maybe just this "not working solution" would do?)

  • Custom User Avatar

    I just solved it, and was certainly never taught anything like this, nor had I stumbled across anything like it. Granted, my solution seems much different than everyone else's, but you don't really need to know any math at all to solve this.

  • Custom User Avatar

    That's not how it is supposed to be solved.

  • Custom User Avatar

    There are tons of katas with really confusing explanations. I believe someone explained to me that if someone changes the description, all people that submitted, will be re-ran against the server posible overloading the server. I think this needs fixing, just don't automatically check all previous submissions. Alert user if they'd like to resubmit due to kata changes or something along those lines. This is a very easy problem to fix, that no one has had the strength to fix.

    @seger Why in hell is your explanation hidden as a spoiler? That should be in the description!
    Making a description cryptic shouldn't be the endgoal here.

  • Loading more items...