• + 0 comments

    That's what I was thinking, too. The easiest solution to the expected output isn't necessarily solving the stated problem. But, that's also the nature of the problems. Perhaps a better problem would be one that simply passed in an array and you had to modify said array in place. That would at least ensure the right problem is being solved.