binary_tree_max_width

  • 2022-12-14
  • 浏览 (595)

binary_tree_max_width.cpp 源码

// 二叉树的最大宽度

#include "vector"
#include "queue"

using namespace std;

struct TreeNode {
    int val;
    TreeNode *left;
    TreeNode *right;

    TreeNode() {}
    TreeNode(int val) : val(val) {}
    TreeNode(int val, TreeNode *left, TreeNode *right) : val(val), left(left), right(right) {}
};

class Solution {
public:
    int widthOfBinaryTree(TreeNode* root) {

    }
};

你可能感兴趣的文章

binary_tree_inorder

binary_tree_level_order

binary_tree_level_order_ii

0  赞