Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ics::pair<int,int> stats (const DTN& root) {
- ics::pair<int,int> pair(0,0);
- if (root.is_word)
- ++pair.second;
- ++pair.first;
- for (auto it = root.children.begin(); it != root.children.end(); ++it){
- ics::pair<char,DTN> entry = *it;
- ics::pair<int,int> temptemp =stats(entry.second);
- pair.first += temptemp.first;
- pair.second += temptemp.second;
- }
- return pair;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement