Pregunta de entrevista de Google

Techinical interview, about leetcode medium level