Just No more free questions left!

Upgrade Now

Write a function to reverse a string in-place.

Since strings in Python are immutable, first convert the string into a list of characters, do the in-place reversal on that list, and re-join that list into a string before returning it. This isn't technically "in-place" and the list of characters will cost additional space, but it's a reasonable way to stay within the spirit of the challenge. If you're comfortable coding in a language with mutable strings, that'd be even better!

You must log in with one click to view the rest.

Once you're logged in, you'll get free full access to this and 4 other questions.

You must log in with one click to view the rest.

Once you're logged in, you'll get free full access to this and 4 other questions.

time and space.

What's next?

RUN
Code execution powered by Qualified.io

. . .