Indeed interview question

Find rectangles inside a 2-d array