MinhBoss13's blog

By MinhBoss13, history, 3 months ago, In English

Hi everyone! I have an interesting problem for which I haven't devised a solution yet. Can you help me?

Problem Statement:

Imagine you have a 2D grid (with dimensions m×n), where each cell in the grid can either be 0 or 1. Your task is to count the number of rectangles (or submatrices) that are made entirely of 1's.

Constraint: mxn <= 1e6

Thanks for taking the time to read and help me!

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it