Chase interview question

the jumbled numbers programming question