Google Interview Question

Leetcode based dsa array question