Pregunta de entrevista de Yext

Medium leetcode questions; very algorithmic