Accenture interview question

Array challenge of non negative integer