Pergunta de entrevista da empresa IXL Learning

rectangle overlap and a bfs question