Pregunta de entrevista de Google

Technical questions, two coding assessments