Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Height(const std::string& man, const std::unordered_map<std::string, std::string>& p_tree) {
- if (!p_tree.count(man)) {
- return 0;
- }
- return 1 + Height(p_tree.at(man), p_tree);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement