Pregunta de entrevista de Google

design question and leetcode question