IDNLearn.com is the perfect place to get detailed and accurate answers to your questions. Ask your questions and receive accurate, in-depth answers from our knowledgeable community members.

There is a grid of black and white cells with rows rows and cols columns, you're given an array black that contains the [row, column] coordinates of all the black cells in the grid your task is to compute how many 2 x 2 submatrices of the grid contain exactly blackcount black cells,