Ad
  • Custom User Avatar

    It actually happens IRL. Sometimes I expand Array.prototype in a kata ( I miss concatMap ), and then the tests use a for .. in loop to iterate over some Array, and I get weird failures.

    Reminds me to expand prototypes the correct way ( and to bash the kata author for not using a for .. of loop :P ).

    Fire the assistent, know your programming language, and use a real one for rocket science ..

    Don't be Jeff. ( Don't be Jim either. )

  • Default User Avatar

    The creator of the kata figured that input of 0 should return 0... at least that's what I think is happening here. My code worked in tests, but failed on submission until I removed the handling of n == 0. Is a lone zero considered "trailing?" I could not find a definitive answer, so I agree that a single zero should be counted as 1.

  • Custom User Avatar

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

  • Custom User Avatar

    I find the description to be too much. You don't need to give all these information, they tend to scare people away and make them think the problem is harder than it really is. Let them do they research by themselves because I personally think this is part of the kata too: research. So please, consider removing all these info and just give some hints to them.

  • Custom User Avatar

    This is the lamest Kata I've ever worked on. If I ever stumble upon such kata I'm leaving codewars. I wasted too many time on this. There's not even a "good" hint (yes, I see that the author tried to give a hint, but it really is not valid as a hint) for where that 'dammit' could come from. Such a waste of time.

  • Custom User Avatar
  • Custom User Avatar

    Lmaooo! Best. Solution. Ever.