Ad
  • Default User Avatar

    While solving the kata it felt like GCD-related at some point, but I could not figure out how... So I can neither confirm nor deny that it is GCD.

  • Default User Avatar

    I thought it was pretty easy as well, and I did C#

    Though I suppose it's up to the mods. They've been on this site longer, they're probably better at gauging difficulty than we are

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

    I do not agree. The concept itself is very complex. It is no coincidence that we find no trace of it in mathematical literature (while Champernowne and the early birds are discussed). In fact, we discover the complexity of the problem ... by solving it!

  • Default User Avatar
  • Custom User Avatar

    it's supposed to be 32 points, yes. Maybe you ranked up at the same time? reaching 2 kyu gives you 150 extra points

  • Custom User Avatar

    errr... It's about finding cycles for sure! x) But you have to count their "perimeter" the right way (and there is that little twist... see below)

    Though, rather than to analyse only the first encountered infinite loop and get stuck in it like the robot would be, your code will have continue deeper in the calls to find the depth of any infinite recursion or terminating call. Then it should return the minimal and the maximal depths encountered, as an array [min, max].

  • Custom User Avatar

    That's the example of the description... => study it more! ;p

    You're not counting the depths appropriately, that's why you end up counting this "non loop" to reach 3 (and it effectively isn't the correct loop).

    not an issue (of the kata) closing. Poke at me if needed.
    cheers

  • Custom User Avatar
  • Custom User Avatar

    XD

    The expected answer would rather have been

    good to know there is a fork feature here

    x)
    => avoid kumite like a plague. ;)

  • Custom User Avatar

    nope, that doesn't exist. "Not really exists", actually.

    There are kumite where you can play with that, but I'd very strongly discourage their use for this, especially one hard katas, because:

    1. kumite are public, so you're actually spoiling the original kata
    2. you can make a kumite private, but then the interest is just the same... private.
    3. creating another kata is more than often out of question because the beta phase has become quite harsh and the kata has a lot of chances to be considered a duplicate

    The idea has interests, tho, but it doesn't fit the way CW's working. Having a good test suite is already hard, so creating several ones for different approaches is even worse. Moreover, what about the rank? All approaches aren't equivalent in terms of difficulties (when the difference is big enough, you can see series like the current one blossom).

    That could be an idea for dan level kata, maybe (if they show up one day): being able to satisfy different kind of requirements on one kind of problem, according to different options. But that'd be a lot of work to set up.

    For the time being, the best you can do is to play with forks of solutions. Close to kumite, but not adding another kata to the database and only visible for other users who have solved the kata (if they are curious enough). There you can play with the test suite, adding stuff/removing others, ... (I tend to play a lot with that).

  • Custom User Avatar

    mmmh, I didn't think about that one... (I didn't know about that yet, when I solved those kata x) )

    I guess it can work, but if you base it on the calls, and not the definitions. The setup will surely be a bit weird, tho, since you'll have to articulate the thing with the definitions at some point... :/

  • Custom User Avatar

    I guess it'll depend on the type of language... Statically typed/compiled, I guess you'll go for the preprocessing (that's what the other kata is about \o/ ). Now, the current approach is simpler, more "python-like" => "do everything at run time". It has a cost about efficiency, for sure, yeah.

    edit: note that you still can preprocess and spot only the cases that will actually be triggered. But there you're definitely solving the other kata already... x)

  • Custom User Avatar

    mmmh, you changed it to an issue while I was writing. Closing now, so. ;)

    edit: here it is in the description:

    but only if said pattern with infinite recursion is invoked at least once.

    you might be interested into this kata, after you solved these series

  • Loading more items...