Samsung Electronics interview question

Integer reverse using an array