Agoda interview question

algorithm about reverse string data stucture about stack