← Questions

Reverse a string in place

0
SnowflakeCodingLast asked Oct 2026

A string arrives as a list of single characters. Reverse it by rearranging that same list, with O(1) extra memory, and return the list.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 3 credits: each one unlocks a question for good.

Your code and the AI tutor open when you unlock this question.