HCLTech interview question

reverse element in array code