Ad
  • Custom User Avatar

    For the sake of clarity I'd suggest making the data structure the way everybody does linked lists - use attribute next, which would contain the next node. Calling the object itself to get the next node makes no sense.

  • Custom User Avatar

    I don't think it's ok that some test cases exceed 1MB (while still allowing plenty of incorrect solutions) .. and it's kind of silly that thousands of people use only a couple handfulls of names as well.

  • Custom User Avatar

    Question: Is O a ssoss?

    Issue1: this is not tested (python), specifically that a daughter comes before the seven sons

    Issue2: description is vague on what the result should be

    {
        "name": "A",
        "gender": "male",
        "children": [
            {"name": "BBBB", "gender": "female", "children": []},  # <- a first female child followed by 7 male. allowed?
            {"name": "B", "gender": "male", "children": []},
            {"name": "C", "gender": "male", "children": []},
            {"name": "D", "gender": "male", "children": []},
            {"name": "E", "gender": "male", "children": []},
            {"name": "F", "gender": "male", "children": []},
            {"name": "G", "gender": "male", "children": []},
            {
                "name": "H",
                "gender": "male",
                "children": [
                    {"name": "I", "gender": "male", "children": []},
                    {"name": "J", "gender": "male", "children": []},
                    {"name": "K", "gender": "male", "children": []},
                    {"name": "L", "gender": "male", "children": []},
                    {"name": "M", "gender": "male", "children": []},
                    {"name": "N", "gender": "male", "children": []},
                    {
                        "name": "O",
                        "gender": "male",
                        "children": [],
                    },
                ],
            },
        ],
    }
    
  • Custom User Avatar

    Python:

    • New test framework should be used

    • Unnecessary logs should be removed and replaced with it blocks

    • test.expect should be revamped

    • Missing corresponding imports

  • Custom User Avatar

    Hi, I passed two of the tree test cases. However, for the test case "DAM", my function says the shift is 8, but it's supposed to be 7. I don't know how to debug this. Why am I off by one, only for this particular test case? Thanks for your help!

  • Custom User Avatar

    From the description:

    fib(10)
    fib.call_count == 177 # True
    fib(10)
    fib.call_count == 344 # True

    Actually that should be 354.

  • Custom User Avatar

    missing

    from preloaded import InvalidArgument
    

    in the initial code

  • Custom User Avatar

    Description should be language agnostic (The function call part should be replaced)

  • Custom User Avatar

    Haskell translation

    Hopefully this translation stays within the spirit of the original kata, as the elements must be homogenous in a standard Haskell list.

  • Custom User Avatar

    In Python, it seems I had the same problem as some others as well: In the random tests, my result was sometimes off by 0.01. This happened a few times, every time on only one of the tests. I was able to pass by attempting a bunch of times though...

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

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

  • Custom User Avatar

    Python: Test should use approximate equality (test.assert_approx_equals) instead of rounding + test.assert_equals when comparing floating point numbers [Doc]

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Loading more items...