IBM Interview Question

They asked me to reverse a string but keep the spacing where it was.