Pergunta de entrevista da empresa Samsung Electronics

Fill the area inside the contour in boolean matrix