Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "solution_tree.h"
- #include <vector>
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int Solution(const Node* root) {
- if (!root) {
- return 0;
- }
- return max(Solution(root->left), Solution(root->right)) + 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement