Google Interview Question

OA, two questions, i would say leetcode medium