Lifesight interview question

Array rank problem