The question is the following:
is there an algorithm which, given an binary tree `T` and an array, allows to store in the array the result of the correspondent in-order visit of the tree?

Pseudo-code of a "normal" in-order visit:

```
inOrder(x){ // x is a node of a binary tree
   if(x != NIL){ // the node is not null
      inOrder(x.left)
      print(x.key)
      inOrder(x.right)
   }
}

// Function calling inOrder
printInOrder(T){ // T is a binary tree
   inOrder(T.root) // T.root is the root of the tree
}

```

Example:
Given the following tree

```
     5 
   /   \
  3     8
 / \   / 
2   7 1   

```

the algorithm above should output `2 3 7 5 1 8`.

I'm sure this can be achieved and it shouldn't be too hard but I'm currently struggling for this problem.