Home > other >  The algorithm () for 3 d cube of the biggest problems in the array.
The algorithm () for 3 d cube of the biggest problems in the array.

Time:10-13

A three dimensional array, using the "1" is for the square, with "0" mean here don't square, how to find out all the "1" in the three dimensional array of square can biggest cube?
Such as:
{
,0,1,1,0,0 {0},
,0,1,1,1,0 {0},
,0,1,1,1,0 {0},
,0,0,0,0,0 {0},
},
{
,0,0,0,0,0 {0},
,1,1,1,0,0 {0},
,1,1,1,0,0 {0},
,0,0,0,0,0 {0},
},
{
,0,0,0,0,0 {0},
,0,1,1,0,0 {0},
,0,1,1,0,0 {0},
,0,1,1,0,0 {0},
},
Among the largest of three dimensional array cube is 2 * 2 * 3 cube,
  • Related