Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I know what the error means lmao. Also, like I said, the directions and deliverables were not specified, next time maybe just try a bit harder when putting the kata together.

  • Custom User Avatar

    I tested your code by adding echo($n); before $a = [];.
    In its random test, for example n=261, the error message started by the following message.

    Failed asserting that two arrays are equal.
    Expected: Array (
        0 => '162'
        1 => '062'
        ...
    

    By scrolling down, I also saw the following message that should be the expected data.

    Actual  : Array (
        0 => 261
        1 => 260
    
  • Default User Avatar

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

  • Custom User Avatar

    If you see the first sample test, it says that the output from reverseSeq(5) is expected as [5,4,3,2,1]. So return type should be clear.

    About the error you had, when I googled the syntax error message, the following page was found.

    https://stackoverflow.com/questions/30971253/php-unexpected-array-t-array

  • Custom User Avatar

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