Given a binary tree, flatten it to a linked list in-place.

For example,
Given

         1
        / \
       2   5
      / \   \
     3   4   6

 

The flattened tree should look like:

   1
    \
     2
      \
       3
        \
         4
          \
           5
            \
             6

========

思路:

将一个二叉树 就地 压成"链表"的结构;

 

相关文章:

  • 2021-12-18
  • 2021-10-16
  • 2022-01-26
  • 2022-02-25
  • 2021-09-04
  • 2022-01-30
  • 2022-02-19
  • 2022-12-23
猜你喜欢
  • 2021-08-05
  • 2021-10-21
  • 2021-12-10
  • 2022-01-05
相关资源
相似解决方案