Providence Interview Question

Arrays related sum and something complex