199. Binary Tree Right Side View(二叉树的右视图)

题目描述 题目链接 https://leetcode.com/problems/binary-tree-right-side-view/ 方法思路 Apprach1: 基于层序遍历,只添加每层的最后一个节点的值。 class Solution { //Runtime: 1 ms, faster than 72.32% //Memory Usage: 37.1 MB, less th
相关文章
相关标签/搜索