Ad
  • Default User Avatar

    thats why you should use tail recurrsion, carrying the accumulator, then any number the function will hold

  • Custom User Avatar

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

  • Custom User Avatar

    Right. My bad!

  • Custom User Avatar

    From the description: "[...] return a string representation [...]"

    I understand why you'd rather have a different return type (me too), but these are the requirements.

  • Custom User Avatar

    (coffeescript): The test cases should be actually undefined and 0, not "undefined" and "0" as strings.

  • Custom User Avatar

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

  • Custom User Avatar

    There seems to be something wrong with the odd test data, it's expecting "���" which obviously does not match the two characters that it should be getting (sorry, I don't know why my browser is not displaying the characters correctly):

    returns correct board for odd dimensions  
    ✔   Test Passed: Value == ■ □ ■
    □ ■ □
    ■ □ ■  
    ✘   Expected: ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ ��� ■ □ ■, instead got: ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ □ ■ □ ■
    □ ■ □ ■ □ ■ □
    ■ □ ■ □ ■ □ ■ 
    
  • Custom User Avatar

    Uhh. Please ignore this.