Domanda di colloquio di Tata Consultancy Services

How to reverse an array based on another array