Samsung Electronics interview question

Fill the area inside the contour in boolean matrix