Infosys interview question

To find the sub array