Lifesight Interview Question

Array rank problem