Amazon Interview Question

Asking to manipulate the data