Motive Interview Question

Array and string Reverse string problem