Solution2 v1 searchRectangle()