由买买提看人间百态

topics

全部话题 - 话题: testword
(共0页)
b*****u
发帖数: 648
1
来自主题: JobHunting版 - 请教G家的一个面试题
int ValidWords ( char[][]matrix, int n, map dictionary)
{
int result = 0;
//every element as starting point
for(int i = 0; i< n; i++)
{
for (int j = 0; j {
map usage;
string testWord;
testWord += matrix[i][j];
usage[i*n+j]=1;
moveNext (testWord; i, j, dictionary,usage,result);
}
}
return result;
}
// move to next step
void moveNext (string testWord, int i, int j, m... 阅读全帖
(共0页)