Ad
  • Custom User Avatar
  • Custom User Avatar

    This was my bad for reading the description poorly. I thought that U U U was identical to U 3 - not the case.

  • Custom User Avatar

    Thanks guys! appreciate it!

  • Custom User Avatar

    Description asks for head position and N: Number of steps leading up to and including the collision

    There is a test case with these moves given: U R L D U R L D

    The first move leads to a collision against the top border of the board. However the test expects [[0, 2], 0] rather than [[0, 2], 1]

    Am I missing something or is this wrong?

  • Custom User Avatar

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

  • Custom User Avatar

    In your alternate solution, the 2 square at row index 4, column index 1 is touching 3 mines.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    The description states: The array of pairs must be in ascending order ... In the case of two pairs with the same first color, the 2nd color must be in ascending order.

    There are some tested pairs with identical red and green parts and different blue parts. These need to be sorted ascendingly based on blue to pass the tests.

    While this is easy to infer, I suggest changing the description

  • Custom User Avatar

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

  • Custom User Avatar

    Description really needs to mention that ONLY the Gregorian calendar should be used, and needs to be applied proleptically for earlier years.

    Otherwise users who don't want to use datetime libs waste time coding Julian<->Gregorian use cases, e.g. the year 1752.

  • Custom User Avatar

    JS needs random tests ;)

  • Custom User Avatar

    i does not need to iterate over all the whole numbers. 2 is the only even whole number that can be a prime. It's nearly twice as fast to first check if the input is divisible by 2 and is not 2, and then starting i off at 3 and iterating with i += 2.

    Also, the loop does not need to go until num/2. Once you get past the square root, there's no point in checking any longer, it has to be prime.

    Example runtimes with a large odd number input:
    iterating over all integers up to num/2: 0.007080078125ms
    interating over odd numbers up to Math.sqrt(num): 0.002685546875ms

  • Custom User Avatar

    Description should be clarified:

    Instead of: "Important: All the integers that its reversed has leading zeroes should be discarded: ex: 1890 its reversed is 981 ("0981")"

    Better: "Important: Do not include numbers which, when reversed, have a leading zero, e.g.: 1890 reversed is 0981, so 1890 should not be included."

  • Custom User Avatar

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

  • Loading more items...