WD Interview Question

A typical leetcode question about arrays