Microsoft Interview Question

array equilibrium