Cognizant Interview Question

even , odd form array reverse a string