Ad
  • Default User Avatar

    @Padmanarayanan: Did you print the input to verify the output yourself? I just passed the tests, and it worked ok.

    If you still believe there's an issue with the tests, post your code (+ the test input) in reply and mark it as a spoiler.
    That's going to be help pin down the issue quickly.

  • Default User Avatar

    Sorry mate, I got blinded. Mistook the -del for -delete (but it's in fact -Delimiter).
    Do you happen to know, if/how I can remove the previous comment?

    My apologies @roba.

    It does NOT remove any files, but is still something of an exploit/cheat solution (using Get-Content instead of a proper function outputting strings).

  • Default User Avatar

    That's malicious code attemting to remove files. Do NOT try it on your own machine!

  • Default User Avatar

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

  • Default User Avatar

    I'm Polish, but French people often mistake me for a German (and Germans often tend to think I'm French). How about you, my friend?

  • Default User Avatar

    Many thanks, Zizou!

    Happy to follow you as well :D This should make us allies :)

  • Default User Avatar

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

  • Default User Avatar

    Didn't take English for granted. The culprit's name might as well have been written in the original Klingon.

  • Default User Avatar

    The good part of the kata was forcing me to abandon the brute-force approach after failing the randomized tests (took too long to compute). So I had to look for a pattern in the results. And this pattern turned out to be really simple.

    However, there's some discrepancy between the desciption:

    the number of doors and students, n ∈ N, n ∈ [1, 1000]

    and the in the input size during randomized tests:

    test.describe("Random tests")
    for i in range(100):
        j = randrange(100000)    
        test.assert_equals(doors(j), door(j))
    

    I'd suggest updating the description and keeping the tests as they are. Let's emphasize elegant solutions as a way to faster and shorter code.

  • Default User Avatar

    A really nice kata overall.
    Some amendedments might be welcome, though (at least for Python):

    1. The description never mentions duplicates. Yet the test cases (k positions in particular) are based on sets of unique values.
    2. How about including an ordered list to explain error priority? (E.g. "No values in the array" being placed higher than "No way")

    PS. By looking at the test cases and output it's definitely possible to pass the challenge anyway ;)