Pregunta de entrevista de Google DeepMind

Typical Leetcode questions, using simple algorithms