We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae1f15b commit 907b0f3Copy full SHA for 907b0f3
src/wordSearch/wordSearch.cpp
@@ -59,7 +59,7 @@ bool exist(vector<vector<char> > &board, string word) {
59
int col = board[0].size();
60
//using a mask to mark which char has been selected.
61
//do not use vector<bool>, it has big performance issue, could cause Time Limit Error
62
- vector< vector<int> > mask(row, vector<int> col);
+ vector< vector<int> > mask(row, vector<int>(col, 0));
63
64
for(int i=0; i<board.size(); i++) {
65
for(int j=0; j<board[i].size(); j++){
0 commit comments