Epic Interview Question

Question on arrays, math puzzles, basic coding