Pregunta de entrevista de Meta

Asked straightforward leetcode easy and mediums.