IDEA Foundation Interview Question

wap to reverse a string