text: # Middle-题目37：199. Binary Tree Right Side View
  
  Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
  
  For example:
  Given the following binary tree,
  
     1            <---
  /   \
  2     3         <---
  \     \
  5     4       <---
  
  You should return [1, 3, 4].
  
  /**
  * Definition for a binary tree node.
  * public class TreeNode {
  *     int val;
  *     TreeNode left;
  *     TreeNode right;
  *     TreeNode(int x) { val = x; }
  * }
  */
  public class Solution {
  public List<Integer> rightSideView(TreeNode root) {
  
  List<Integer> list=new ArrayList<Integer>();
  if(root == null)
  return list;
  
  while(!queue.isEmpty()) {
  TreeNode current = queue.remove();
  int curLevel=levelqueue.remove();
  
  if(current.left!=null) {
  }
  if(current.right!=null) {
  }
  if(levelqueue.isEmpty() == true || levelqueue.peek() == curLevel + 1)
  }
  return list;
  }
  }
  
  3ms,beats 10.90%,众数3ms,40.54%
  
  #### [JAVA]LeetCode199 Binary Tree Right Side View
  
  2015-04-09 19:41:15
  
  #### Leetcode 199: Binary Tree Right Side View
  
  2015-04-23 21:23:06
  
  #### 【LeetCode】Binary Tree Right Side View 解题报告
  
  2015-04-06 10:33:34
  
  #### 199. Binary Tree Right Side View Leetcode Python
  
  2015-04-15 19:11:49
  
  #### leetcode-199 Binary Tree Right Side View
  
  2015-04-09 14:32:29
  
  #### leetcode 199. Binary Tree Right Side View-树的右视图|递归|非递归|Java|Python
  
  2016-05-31 22:20:00
  
  #### 【LeetCode】199. Binary Tree Right Side View 解题报告（Python）
  
  2018-03-14 17:21:48
  
  #### LeetCode 199. Binary Tree Right Side View（二叉树右侧视图）
  
  2016-05-04 03:32:35
  
  #### LeetCode-199. Binary Tree Right Side View (JAVA)（二叉树最右侧结点)
  
  2017-04-17 17:06:09
  
  #### 【LeetCode】199. Binary Tree Right Side View-二叉树右视图结点
  
  2017-03-28 10:37:45
metadata: {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}