Samsung Electronics Interview Question

Fill the area inside the contour in boolean matrix