ProgrammingVery hard

Using a largest-square DP on grid rows [1,0,1,1], [1,1,1,1], [1,1,1,0], what is the side of the largest all-ones square?

  1. A. 1
  2. B. 3
  3. C. 4
  4. D. 2

Correct answer: D. 2

A 2 x 2 block of ones exists in rows 0 and 1 at columns 2 and 3, and no 3 x 3 block of ones exists.

More C Programming questions

Exams that ask this topic