Ad
  • Default User Avatar

    recursion is neat

  • Default User Avatar

    I'm a bit confused about the challenge. The first test case is for "4041000" to resolve into 2982. According to the rules of the Kata, that'd be 4*(7!)+0*(6!)+4*(5!)... and so on. However, 7! alone is already 5040, so "4041000" can't possibly be the solution.

    What am I not understanding?

  • Default User Avatar

    My God what a frustrating Kata. It's again one of those, "your solution might work for 100k items but we're testing 5 Million".

    I wish katas that are purely complicated because they require some esoteric levels of optimization would be tagged as such.

  • Default User Avatar

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

  • Default User Avatar

    You shouldn't; defeats the spirit of the game.

  • Default User Avatar

    Well, I GUESS that's an option too.

  • Default User Avatar

    True, but the kata specified that numbers are 0-9, so double digits are out of scope.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    No; I haven't completed it yet, and I don't want to forfeit eligability. Maybe I'll change my mind about it later and try it again.

  • Default User Avatar

    I've worked on it in Python. Tried my own version(s), timed out, googled around, and even the neat solutions on Stackoverflow either time out or have too many recursions. It's a 5 kyu challenge; that seems a bit harsh. Maybe JavaScript runs faster or something, I dunno, but I did not manage to get any programmatical solution to work, and I just don't want to just implement the formula off Wikipedia.

  • Default User Avatar

    I know perfectly well what the work of a programmer entails. I'm saying that I don't like this kind of kata, because it's not actually a programming challenge. You can't even create your own algorithm to solve the issue, because the test cases really only allow for a super optimized solution. Either you're a mathematician, or you Google the solution and copy over the code.

    Nothing about this is fun. It requires no creative problem solving, it doesn't reward trial and error nudging towards a good solution, and you don't actually learn anything from solving it -- it's just a hypothetical college math problem presented as a programming challenge. At least remove the algorithm tag and show it's just a mathematics kata.

  • Default User Avatar

    I really dislike this kind of Kata. It's trivial to solve programmatically, but the programmatical solution is prevented through absurdly large test cases and hard-capped computation time. Instead, the solution is to calculate it. This isn't mathwars, this is codewars. Why is this flagged as an algorithm kata when the only "algorithm" is to implement a math formula that someone else came up with?

  • Default User Avatar
  • Default User Avatar

    I always feel like this kinda solution is sidestepping the issue more than solving it.

  • Loading more items...