Google Interview Question

Similar to Rotten oranges leetcode