First of all I'd like to apologize but I could not come up with a better title.
I have implemented a BST in C++ with 3 properties: left, right and data.
Suppose after some insertions it look like
.
How could I print the BST in the console like ?
The number of X's used should be the minimum possible. I've been looking at this question for quite some time and I'm not able to come up with anything. Any help is appreciated.