层序遍历给定的树,将每层的结果存入数组中,并判断数组是否对称 /** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * }; */ class Solution { private: bool symmetric(vector<int>& nums) { int l = 0, r = nu...