Nagarro interview question

Code to reverse the given array of elements