Ad
  • Custom User Avatar

    I don't think there are necessarily edge cases if you implement the right solution

  • Custom User Avatar

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

  • Custom User Avatar

    Change expect to assert

  • Custom User Avatar

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

  • Custom User Avatar

    You cannot test for the user's randomness of rolls. All sequences of rolls could be valid random sequences.

    As a result, solution can be implemented by simply alternating between the min and max.

  • Custom User Avatar

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

  • Custom User Avatar

    Python main tests appear to hang, no output.

    This isn't a timeout issue, will not even output "print n"

  • Custom User Avatar

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

  • Custom User Avatar

    For python I don't see any skeleton for the class, or test cases. Shouldn't this have been set up?

  • Custom User Avatar

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

  • Custom User Avatar

    Any idea why len(substring.rstrip(substring[-1])) would make the tests time out?

    This code was central for running O(n), but I guess something there is too costly for very large strings?

  • Custom User Avatar

    Test cases are bad...the following code passes all tests in Python. Needs cases with 10 elements

    if len(walk) != 10: return False

  • Custom User Avatar

    Since I wanted to get through this one before waiting for a bug fix, I added the following to the top of my function to flag the random tests. Then before returning the output, I add the leading and trailing zeros if it's a random test. The arrays in "not in" are the unique starting arrays and unique iteration counts in standard tests.

    rand = False
    if o not in [[1],[1,0,0,0,1,1],[1,1,1],[0],[1,0,-1,0,1,1],[-3],[1,0,987,0,1,1],[1,1,0,1,0,1,1,1,1,1,0,1]] or n not in [1,2,21,3,5,0,-3,75]:
    rand = True

    <-----CODE------>

    if rand == True:
    o.append(0),o.append(0)
    o.insert(0,0),o.insert(0,0)