Pergunta de entrevista da empresa Flatiron Health

Asked two medium-hard graph problems