Google interview question

cant disclose but leetcode hard