这是leetcode里的一道题,判断数独数据是否有效,我写了函数分别判断行列是否有效,然后现在需要
判断每个小方块是否有效。所以需要从9x9的数组中提取出来9个3x3的数组,然后分别判断是否有效,
如今在这个提取子数组的过程中遇到了困难,哪位大侠可否提供下解决方案?
58 bool IsAllBlocksValid (int arr[][9])
59 {
60 int arrnums[3][3] = {0};
61 for (int index_row = 0; index_row < 9; ++index_row)
62 {
63 for (int index_col = 0; index_col < 9; ++index_col)
64 {
65
66 }
67 if (!Is3x3Valid (arrnums))
68 return false;
69 }
70 return true;
71 }