NVIDIA interview question

Given a string input, write a function that reverses it.