Value Research interview question

In interview they asked 2 programs 1. Array sorting and 2. Armstrong number