leetcode-117-Populating Next Right Pointers in Each Node II

闾丘谦
2023-12-01

Error:
misleading by the problem, it said stack cannot count as extra space. In here, we should use iterate solution.

  1. Assume we create the next link level
  2. keep track of next level head and next level current processing.
  3. move current link to its next
  4. repeat until current link is null, then move to next level, do the same thing.
 类似资料: