• + 0 comments

    Your solution is bad for the problem as it is today. You are printing the elements, but the problem, at least today, says you should return the array. If you do the assigning to the array in one line then it is not possible to check when to assign, so you will always assign, which will be much slower. For this reason i will have to give a downvote to your answer. Still pretty cool for a problem that ask to print them instead of returning, tho