Ad
  • Custom User Avatar

    Interesting, but I think it's too late to alter the acceptance criteria such that solutions that have already passed would fail. Such changes are typically done when the kata is in beta. But, I encourage you to write a new kata that addresses such edge cases. One suggestion is: Given S, find a minimal set S' such that S'and S have the same closures.

  • Custom User Avatar

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

  • Custom User Avatar

    Awesome kata, thanks very much. I enjoyed solving it.

  • Custom User Avatar

    Random inputs are now guaranteed to consist of positive numbers.

    It is theoretically possible for a random input to be [ 1 ], in which case closureGen([ 1 ])[999] is tested against undefined. This makes sense in the language; I'm not preventing this degenerate case.

  • Custom User Avatar

    The point in the description is not to show all the steps in a recursion, but to show how the rules can be used to determine the values of the function. You can use recursion, but that's up to you. It's also your job to figure out why and how one could use recursion.

  • Custom User Avatar

    I believe there is an error in the example portion of your intructions that lends to some confusion.

    Current:
    "Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = 1 + 2 = 3"

    Should be:
    "Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = 1 + fusc(1) + fusc(2) = 1 + 1 + 1 = 3"

    Even more accurately:
    "Putting these results together fusc(10) = fusc(5) = fusc(2) + fusc(3) = fusc(1) + fusc(1) + fusc(2) = 1 + 1 + fusc(1) = 1 + 1 + 1 = 3"

    The example should show all the steps of recursion. Currently it appears that fusc(3) directly equals 2 when actually there's another step of recursion that further expands fusc(3) into 2 more functions. I think it's important to show this extra step for clarity.

  • Custom User Avatar

    Great kata, thank you.

  • Custom User Avatar

    the function "enumerate" is so cool!

  • Custom User Avatar

    Took me a few iterations to get this one liner.

  • Custom User Avatar

    i refused to admit that you guys got this solution the first time you went through

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Pretty challenging kata mathematically speaking though.

  • Custom User Avatar

    work smarter not harder :P

  • Custom User Avatar

    That is some clever obfuscation. It turns out to be definitely in the 7 kyu neighborhood, after random tests timed out, and I was briefly tempted to use pthreads. whew!

  • Loading more items...