Pergunta de entrevista da empresa Uber

Calculate the bounding box for a series of connected components