没有什么思路。答案搬运。
recursion
卧槽。。。so elegant...
Better, O(1) space iterative
Populate Next Right Node in Each Node II:
Constant Space
没有什么思路。答案搬运。
recursion
卧槽。。。so elegant...
Better, O(1) space iterative
Populate Next Right Node in Each Node II:
Constant Space