# Problem Definition

## Description

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

Example:

Given

```plaintext
         1
        / \
       2   5
      / \   \
     3   4   6
```

The flattened tree should look like:

```plaintext
   1
    \
     2
      \
       3
        \
         4
          \
           5
            \
             6
```

Note that the left child of all nodes should be `NULL`.

## Notes

1. [LeetCode discussion - Straightforward Java Solution](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/discuss/36987/Straightforward-Java-Solution)
1. [LeetCode discussion - Share my simple NON-recursive solution, O(1) space complexity! - Morris traversal](https://leetcode.com/problems/flatten-binary-tree-to-linked-list/discuss/37010/Share-my-simple-NON-recursive-solution-O(1)-space-complexity!)
1. [ProgramCreek](https://www.programcreek.com/2013/01/leetcode-flatten-binary-tree-to-linked-list/)