MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / exist

Method exist

Backtracking/Homework/wordSearch.cpp:17–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 return temp;
16 }
17 bool exist(vector<vector<char>>& board, string word){
18 int n=board.size();
19 if(n==0) return false;
20 int m=board[0].size();
21 if(word.size()==0) return false;
22 for(int i=0;i<n;i++){
23 for(int j=0;j<m;j++){
24 if(word[0]==board[i][j]){
25 if(helper(board,word,i,j,n,m,0)) return true;
26 }
27 }
28 }
29 return false;
30 }
31};

Callers

nothing calls this directly

Calls 1

helperFunction · 0.70

Tested by

no test coverage detected