Publicis Sapient interview question

Reverse an array by a particular index