Drawing Rectangles | HackerRank

Find a way to erase a drawing consisting of rectangles by erasing rows and columns.