贵州谢高低

关注

117.populating-next-right-pointers-in-each-node-ii

贵州谢高低

关注

阅读 43

2022-05-19


Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?

Note:
You may only use constant extra space.


For example,
Given the following binary tree,

1
/ \
2 3
/ \ \
4 5 7



After calling your function, the tree should look like:

1 -> NULL
/ \
2 -> 3 -> NULL
/ \ \
4-> 5 -> 7 -> NULL


相关推荐

小龟老师

117. Populating Next Right Pointers in Each Node II**

小龟老师 33 0 0

大漠雪关山月

LeetCode //C - 117. Populating Next Right Pointers in Each Node II

大漠雪关山月 48 0 0

狐沐说

Leetcode: Populating Next Right Pointers in Each Node

狐沐说 88 0 0

婉殇成长笔记

116.populating-next-right-pointers-in-each-node

婉殇成长笔记 44 0 0

左手梦圆

LeetCode: 116. Populating Next Right Pointers in Each Node

左手梦圆 65 0 0

guanguans

node.js —— express中的next( )

guanguans 79 0 0

zmhc

FZU - 1901 Period II(KMP next数组的理解)

zmhc 69 0 0

独兜曲

HDOJ 1027 Ignatius and the Princess II (DFS、next_permutation函数)

独兜曲 44 0 0

青青子衿谈育儿

LeetCode-503. Next Greater Element II [C++][Java]

青青子衿谈育儿 139 0 0

_karen

117. 填充每个节点的下一个右侧节点指针 II

_karen 31 0 0

精彩评论(0)

0 0 举报