Ad
  • Custom User Avatar

    I suggest adding test cases where the date of birth is exactly n years before the current date and is in a leap year

  • Custom User Avatar

    please consider improving the description by providing more specific details. the current instructions are unclear and could be refined for better understanding.

  • Custom User Avatar

    You will be provided with two object arrays.

    wording is too C#-specific (and is probably not an appropriate type for C#)

    additionally, description does not state that the given positions are for a knight and a bishop, the description thus does not state what the problem to solve is. those pieces could be pawns for all I know from reading the description

    it is also a very strange and indirect way of stating that only two pieces exist on the board

    It could instead read something along the lines of:

    You will be provided with the positions of a knight and a bishop on a board that is otherwise empty (e.g. [4, "C"] and [6, "D"]).

  • Custom User Avatar

    The second value in the first pair in the array is 0, since the bus is empty in the first bus stop.

    Not the case for Ruby

  • Custom User Avatar

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

  • Custom User Avatar
  • Custom User Avatar

    I feel like the method name for the Groovy translation should be whatIsTheTime in camelCase instead of PascalCase

  • Custom User Avatar

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

  • Custom User Avatar

    The JavaScript translation uses PascalCase for the name of the function (SubtractSum), but according to JavaScript naming conventions it should be using camelCase for this (subtractSum), this should be corrected both in the default code and in the tests.

  • Custom User Avatar

    EDIT: I also got it to work by including an additional default (parameterless) constructor.


    I had a lot of issues with this one trying to use a constructor to initialize the name property.

    i.e, I had to remove:
    public PersonEventArgs(string name)
    {
    Name = name;
    }

    And pass the name by doing:

    ContactNotify?.Invoke(this, new PersonEventArgs(){Name=name});

    Any attempt to pass name resulted in a CS7036 error depicting there was no parameter 'name' of 'PersonEventArgs.PersonEventArgs(string)'

  • Custom User Avatar

    C#: method name should be PascalCase (Please refer to implementation of backward compatibility here )

  • Custom User Avatar

    Actual and expected are swapped in PHP

  • Custom User Avatar

    I have a problem with randomTests, always one of the tests fails in the same way after 6-10 tests.

    Env: PHP 8.0
    Json of array elements $piecesPositionList

    ["E_Yellow","A_Red","C_Yellow","C_Red","G_Yellow","B_Red","D_Yellow","B_Red","A_Yellow","E_Red","A_Yellow","G_Red","G_Yellow","D_Red"]"
    

    My result: Win:Yellow

    Tests result:

    Failed asserting that two strings are identical.
    Expected: 'Red'
    Actual  : 'Yellow'
    

    The problems I see:

    1. the tests are written in such a way that once in a while under the right assumptions of the algorithm this problem occurs. This is impossible to debug
    2. my algorithm is too inefficient and causes phpunit error (this is unlikely)

    Any possible suggestion of a solution is welcome.

  • Custom User Avatar

    C# initial code could mention that files are noted with a string and not a char

  • Custom User Avatar

    I run into a problem if the last move in the list is the winning move.

    For theese moves:
    (
    [0] => C_Red
    [1] => F_Yellow
    [2] => G_Red
    [3] => B_Yellow
    [4] => F_Red
    [5] => B_Yellow
    [6] => D_Red
    [7] => E_Yellow
    [8] => G_Red
    [9] => D_Yellow
    [10] => D_Red
    [11] => D_Yellow
    [12] => C_Red
    [13] => C_Yellow
    [14] => D_Red
    [15] => C_Yellow
    [16] => B_Red
    [17] => B_Yellow
    )

    Yellow is winning on the diagonal from B3 to E0.

    But the test expects "Draw" not "Yellow".

  • Loading more items...