Loop to evaluate each column of the prefix matrix uniquely . For each index of a column we will try to determine the number of sub - matrices starting from that index and has all 1 s
for j in range ( 0 , n ) : NEW_LINE INDENT i = n - 1 NEW_LINE DEDENT