XYZ (Turkey) interview question

reverse linked list max element in array