Pergunta de entrevista da empresa Microsoft

How do you find whether a flower in a bit map image is connected?