Pregunta de entrevista de Flatiron Health

Asked two medium-hard graph problems