Jet interview question

a algorithm question related to array