• + 0 comments

    The writeup specified that the output was to be printed the array reflecting the rotation. Nothing about having to actually create a rotated array and dump it to the console. And considering the submitter never supplied a stub to the actual rotation routine specifying the return as being an array, this is a legitmate answer. Likely not the one the OP intended.

    If I were to give a coding test to someone I'd toss them something like this. Likely they'd code out a fancy in-place algorithm, in which I would warn them that they were over-engineering the solution for the specified output.