标签:amp img play esc tle alt 包含 closed return
1 /* 2 public class TreeLinkNode { 3 int val; 4 TreeLinkNode left = null; 5 TreeLinkNode right = null; 6 TreeLinkNode next = null; 7 8 TreeLinkNode(int val) { 9 this.val = val; 10 } 11 } 12 */ 13 public class Solution { 14 public TreeLinkNode first(TreeLinkNode p) { 15 if (p.left != null) { 16 return first(p.left); 17 } 18 return p; 19 } 20 public TreeLinkNode GetNext(TreeLinkNode pNode) 21 { 22 TreeLinkNode p = pNode; 23 TreeLinkNode last = null; 24 while (p != null) { 25 if (p.left != null && p.left == last) { 26 return p; 27 } 28 if (p.right != last && p.right != null) { 29 return first(p.right); 30 } 31 last = p; 32 p = p.next; 33 } 34 return p; 35 36 } 37 }
标签:amp img play esc tle alt 包含 closed return
原文地址:https://www.cnblogs.com/hyxsolitude/p/12246526.html