StarHub interview question

Could you not use array to chase multiple numbers