Not Able to find error in this leetcode problem. https://leetcode.com/problems/count-square-submatrices-with-all-ones/

This is my code. https://ide.codingblocks.com/s/661484

hi @mohit26900,
check here and do a dry run yourself you’ll get it :slight_smile: iv commented the code