Amdocs interview question

reverse string