Evenset Interview Question

Algorithm and Logic Question