Micro1 Interview Question

DSA array based coding question with O(n)