Thx. I used so many loops in my solution at first, but your solution looks good.
But you have a little mistake in the second solution. In line where you finally reverse the whole array it shoud be arr.reverse() instead of array.reverse(). It seems you got a divergence with code from video again) Have a nice day
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thx. I used so many loops in my solution at first, but your solution looks good.
But you have a little mistake in the second solution. In line where you finally reverse the whole array it shoud be arr.reverse() instead of array.reverse(). It seems you got a divergence with code from video again) Have a nice day