Hi!
I want to know if it is possible to display a binary tree using double linked list as follows:
A
/ \
B C
/ \ /
D E F
I tried some possibilities but i think it is impossible since there are lots of parameters to take in account.
Pliz help me, my lecturer wants an output like that.

First I thought this should be easy. But I am finding it hard to co relate the / & \ and the spaces according to the nodes present above.
The Input to my program is: 5738642
And the output is:

5
37
2468

EDIT: By the way I am using a search tree for simplicity.