Google Interview Question

Algorithm based Leetcode Hard question