请问TP怎么关进程?# PDA - 掌中宝
i*h
1 楼
Imagine you have a square matrix, where each cell is filled with either
black or
white. Design an algorithm to find the maximum subsquare such that all four
borders are filled with black pixels.
解释是:
This algorithm does the following:
1. Iterate through every (full) column from left to right.
2. At each (full) column, look at the subcolumns (from biggest to smallest).
3. At each subcolumn, see if you can form a square with the subcolumn as the
left
side. If so, update currentMaxSize and go to th
black or
white. Design an algorithm to find the maximum subsquare such that all four
borders are filled with black pixels.
解释是:
This algorithm does the following:
1. Iterate through every (full) column from left to right.
2. At each (full) column, look at the subcolumns (from biggest to smallest).
3. At each subcolumn, see if you can form a square with the subcolumn as the
left
side. If so, update currentMaxSize and go to th