luckyboy
Results
3
comments of
luckyboy
大佬,116题有个不同的解法,就是根据当前节点的父节点的next节点(如果存在的话),就可以找到他的跨节点的 ```java public static TreeNode connect(TreeNode node) { //判断node的right和或者left不为空即可 if(node.getLeft() == null) { return node; } TreeNode left = node.getLeft(); TreeNode right = node.getRight(); //先把节点内的next搞定 left.setNext(right); //对于跨节点的,根据当前节点的父节点的next(如果next存在的话),就能找到他的跨节点 TreeNode next =...
我也是
现在根本连不上了。。。。