Arrays: Left Rotation

  • + 1 comment

    According to the PHP documentation of array_slice third argument denotes the length of the slice.

    array array_slice ( array $array , int $offset [, int $length = NULL [, bool $preserve_keys = FALSE ]] )
    

    If I do not pass third argument then it will be NULL by default. As a result the slice will be created until the end of the array. I believe there is nothing to do with the volume of the array. Moreover, without passing the third argument like I denoted in my previous comment I am having all the test cases passed.