inline bool compare unsigned int it if query size db it size return fa

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
inline bool compare(unsigned int it){
if(query.size()!=db[it].size())
return false;
for(unsigned int i=0; i<query.size(); i++){
if(db[it][i].size()<query[i].size())
return false;
for(unsigned int j=0; j<query[i].size(); j++){
if(query[i][j]!=db[it][i][j])
return false;
}
}
return true;
}