You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README_EN.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,8 @@ Complete solutions to [LeetCode](https://leetcode-cn.com/problemset/all/), [LCOF
122
122
-[BiNode](/lcci/17.12.BiNode/README_EN.md)
123
123
-[Convert Binary Search Tree to Sorted Doubly Linked List](/solution/0400-0499/0426.Convert%20Binary%20Search%20Tree%20to%20Sorted%20Doubly%20Linked%20List/README_EN.md)
124
124
-[Boundary of Binary Tree](/solution/0500-0599/0545.Boundary%20of%20Binary%20Tree/README_EN.md)
125
+
-[Populating Next Right Pointers in Each Node](/solution/0100-0199/0116.Populating%20Next%20Right%20Pointers%20in%20Each%20Node/README_EN.md)
126
+
-[Populating Next Right Pointers in Each Node II](/solution/0100-0199/0117.Populating%20Next%20Right%20Pointers%20in%20Each%20Node%20II/README_EN.md)
<p>You are given a <strong>perfect binary tree</strong> where all leaves are on the same level, and every parent has two children. The binary tree has the following definition:</p>
8
8
9
-
10
-
11
9
<pre>
12
10
13
11
struct Node {
@@ -24,41 +22,25 @@ struct Node {
24
22
25
23
</pre>
26
24
27
-
28
-
29
25
<p>Populate each next pointer to point to its next right node. If there is no next right node, the next pointer should be set to <code>NULL</code>.</p>
30
26
31
-
32
-
33
27
<p>Initially, all next pointers are set to <code>NULL</code>.</p>
34
28
35
-
36
-
37
29
<p> </p>
38
30
39
-
40
-
41
31
<p><strong>Follow up:</strong></p>
42
32
43
-
44
-
45
33
<ul>
46
34
<li>You may only use constant extra space.</li>
47
35
<li>Recursive approach is fine, you may assume implicit stack space does not count as extra space for this problem.</li>
0 commit comments