Advertisement
mfgnik

Untitled

Jun 30th, 2020
1,275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. int Height(const std::string& man, const std::unordered_map<std::string, std::string>& p_tree) {
  2.     if (!p_tree.count(man)) {
  3.         return 0;
  4.     }
  5.     return 1 + Height(p_tree.at(man), p_tree);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement