LC: 750. Number Of Corner Rectangles
https://leetcode.com/problems/number-of-corner-rectangles/
Input: grid = [[1,0,0,1,0],[0,0,1,0,1],[0,0,0,1,0],[1,0,1,0,1]]
Output: 1
Explanation: There is only one corner rectangle, with corners grid[1][2], grid[1][4], grid[3][2], grid[3][4].Input: grid = [[1,1,1],[1,1,1],[1,1,1]]
Output: 9
Explanation: There are four 2x2 rectangles, four 2x3 and 3x2 rectangles, and one 3x3 rectangle.Input: grid = [[1,1,1,1]]
Output: 0
Explanation: Rectangles must have four distinct corners.Last updated


