Accenture Interview Question

Array challenge of non negative integer