Ad
  • Custom User Avatar

    Yes, from the description:

    The return value should be a 2d array cropped around all of the living cells.

  • Custom User Avatar

    thanks for the hint

  • Custom User Avatar

    Hi, did you ever figure this out? Your input is clearly length four and should have two bytes of padding.

  • Custom User Avatar

    This is most likely because you are mutating the input array, i suggest you just create a copy of fhe array and you should pass this issue

  • Custom User Avatar

    I failing with this:

    Got
    ▓▓░░░░
    ░░▓▓▓▓
    ▓▓▓▓░░

    instead of
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░▓▓░░░░░░░░░░░░
    ░░░░░░░░░░▓▓▓▓░░░░░░░░
    ░░░░░░░░▓▓▓▓░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░
    ░░░░░░░░░░░░░░░░░░░░░░

    Yet the instructions state the world should be cropped around the living cells. If this is the case, then why is the test case above valid?

  • Custom User Avatar
  • Custom User Avatar

    The world can expand, but should it also shrink? I.e. if there are no living cells on an outer edge, should that outer edge be removed from the world?

  • Custom User Avatar

    Only cells with exactly 3 neighbors become alive. The second cell has three neighbors that are alive (diagonals are included). The third cell does indeed have two neighbors, but only two, so it maintains whatever stat it had.

  • Custom User Avatar

    Yup this is the case

  • Custom User Avatar

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

  • Custom User Avatar

    I accidently changed that back with my fork. Sorry about that.

  • Custom User Avatar

    I am getting the same thing.
    Is there a way to get past this?

    Edit: Ok all you need is to round(num, 4) - in Python.

  • Custom User Avatar

    Not a mathematical set. I'll change it to say "group".

  • Custom User Avatar

    Unclear on some things. So, each time a person drinks, they double and BOTH move to the end of the queue. So, after 5 drinks, everyone has doubled:

    ['Sheldon', 'Sheldon', 'Leonard', 'Leonard', 'Penny', 'Penny', 'Rajesh', 'Rajesh', 'Howard', 'Howard']

    The 6th drink, Sheldon goes again, and doubles. Does this mean all instances of Sheldon double, or just the one drinking at that time? If it's just the one drinking the can, the queue becomes:

    ['Sheldon', 'Leonard', 'Leonard', 'Penny', 'Penny', 'Rajesh', 'Rajesh', 'Howard', 'Howard', 'Sheldon', 'Sheldon']

    Is this correct?

  • Custom User Avatar

    The problem states:

    "We can then assign a number to every word, based on where it falls in an alphabetically sorted list of all words made up of the same set of letters."

    Words made up of the same set of letters can only be 'AB' and 'BA' - since we're dealing with a set? Yet the problem includes examples with 'AAAB', etc

  • Loading more items...