NETGEAR Interview Question

Array manipulation problem