Flexport Interview Question

Stupid double array matrix problem