Ad
  • Default User Avatar

    I understand how this works already.
    I was just commenting because i found this solution to be quiet funny :).

  • Default User Avatar

    Why? Just why... I love it.

  • Default User Avatar

    Seems like the issue has been raised.

  • Default User Avatar

    I was just taking into account that not everything was covered. For example the letter "o" is not covered on this kata.
    This should have been covered by the random tests and if not then atleast the basic tests.

  • Default User Avatar

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

  • Default User Avatar

    There is no test that contains only two items after viewing it, even if there was it would mean 216 people wouldn't be able to complete the task.
    You must have edited one of the sample tests :).

  • Default User Avatar

    216 people have completed this kata in C. This is clearly not an issue with the kata but more an issue with your code.
    If you keep trying you should be able to figure it out :).

  • Default User Avatar

    If you look at the example, the place where it says (YOU ARE HERE AT THE FRONT OF THE QUEUE) is not where the array starts when given to you.

    (THE ARRAY STARTS HERE) [sheep, sheep, sheep, sheep, sheep, wolf, sheep, sheep] (YOU ARE HERE AT THE FRONT OF THE QUEUE)

    So now when you are doing indexOf("wolf") in this instance you will get 5. Then you are doing -- which will give you the index of 4.
    This will give you the wrong answer but a personal recommendation is to reverse the array when working with it.

    Hope this helped :)!

  • Default User Avatar

    Saying that 471 people have completed this question in JavaScript it is very likely your code is incorrect.
    Also since there are random tests on this kata you will find that the passed/failed amount will vary.

  • Default User Avatar

    I think that suggestion maybe for a different website...

  • Default User Avatar

    And you cheated and passed and basically got nothing from it :).

  • Default User Avatar

    More comments of course would make this better. You know, a few talking about what each bracket does...

  • Default User Avatar

    I'm just going to grab response that Chrono79 wrote which seems to relate.

    Second argument (optional)

    See the sample test: titleCase('the quick brown fox') there is no second argument there

  • Default User Avatar

    This kata seem's just like marmite, you either love it or you hate it...

  • Default User Avatar

    That is something for you to figure out :)

  • Loading more items...