Ad
  • Custom User Avatar

    The python's version of this Kata should be rewrite. The implementation of the Node class is not specified. what's more, the Node class is nearly meaningless and increases difficulty unnecessarily. It would be much better to change the way the graph is stored.

  • Custom User Avatar

    The massive test (only) gives me the following error:

    Traceback (most recent call last):
      File "tests.py", line 87, in <module>
        test.assert_equals(sorted_string, list(sort(test_string_gen)), "Failed to sort a massive set of random words.")
      File "/workspace/default/solution.py", line 3, in sort
        L=f(words)
      File "/workspace/default/solution.py", line 11, in f
        for i in range(0,len(L),2):
    TypeError: object of type 'itertools.chain' has no len()
    

    That means some tests don't pass a list, which contradicts the description: Write a sort function that will sort a massive list of strings in caseless, lexographic order.

  • Custom User Avatar

    Hello. I need help. I believe I'm missing some important fundamentals here and the question is dumb, but I can't get the data.

    If I write "return grid" it returns plain list of coordinates without any other data. So I see something like [[(0,0),(0,1),..],[(1,1),(1,2),...]etc] instead of the expected matrix blueprint.
    I know how to do it if the function takes the matrix itself, but I don't understand what am I suppose to do with plain list of coordinates.
    So, help, please tell me what am I doing wrong.

    For the record: I believe using "blueprint = grid1_blueprint" in the function must work but it returns an error.

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    All words will be between 1 and 8 characters long

    The maximum word length is actually 5 characters.

  • Custom User Avatar

    Instructions are hinting at trie, and a trie is used in tests.
    But mergesort will pass.
    So really, the kata is just "implement regular sorting" and all the rest is just misleading/irrelevant.

    Also: it should probably be asking for something iterable, not an iterator. That's just weird.

  • Custom User Avatar

    I get this error when I try to test my function:

    Kata/GetToTheChoppaSpec.hs:1:53:
        Not in scope: `main'
        Perhaps you meant `min' (imported from Prelude)
    

    I tried resetting the test code, and it didn't help.
    Here's the first line of the test code:

    module Kata.GetToTheChoppaSpec where
    

    I also tried adding a list of functions and types to export to my module's declaration, but it didn't help either.

    After poking around with importing HSpec pieces to try to run them in main, I found the solution on the Hspec github: running-specs
    I put main = hspec spec in my testing module and it worked. Is this an issue with the kata?

  • Custom User Avatar

    python: the contract of the node class should be given. Especially, that it does not have an implemented __hash__ method...

  • Custom User Avatar

    How many tests are there?

  • Custom User Avatar

    Passed input is susceptible to mutation and it affects tests.

  • Custom User Avatar

    I agree with the other warriors who found the Node objects to be unnecessary.

    I think this kata could be improved by completely removing the Node class, changing the test cases to a simple array (list of lists) of 0's and 1's, and changing the solutions to a list of tuples.

  • Custom User Avatar

    The matrices are transposed during string -> list of lists of nodes conversion, so the logs (which should not be there in the first place) are wrong.

  • Custom User Avatar

    No random tests.

  • Custom User Avatar

    Language-specific blocks should be used in the description.

  • Loading more items...